I first run sudo dpkg --remove jenkins
and I get a response :
dpkg: error processing package jenkins (--remove):
package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
Errors were encountered while processing:
jenkins
So I then try with sudo apt-get --reinstall install jenkins
and result is :
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
jenkins
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/68.9 MB of archives.
After this operation, 895 kB of additional disk space will be used.
Selecting previously unselected package jenkins.
(Reading database ... 346826 files and directories currently installed.)
Preparing to unpack .../jenkins_2.19.1_all.deb ...
Not configured to run standalone
invoke-rc.d: initscript jenkins, action "stop" failed.
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Not configured to run standalone
invoke-rc.d: initscript jenkins, action "stop" failed.
dpkg: error processing archive /var/cache/apt/archives/jenkins_2.19.1_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
Not configured to run standalone
invoke-rc.d: initscript jenkins, action "start" failed.
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/jenkins_2.19.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Anyone can tell what should I do to fix and update the package ?
sudo apt-get clean && sudo apt-get update && sudo apt-get upgrade
(last command perform a package upgrade) – Liso Oct 30 '16 at 09:00