On my Ubuntu machine I am trying to do a local install of jenkins. I have followed this guide:
https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu
But when I run sudo apt-get install jenkins
I get this error:
After this operation, 66.4 MB of additional disk space will be used.
(Reading database ... 303314 files and directories currently installed.)
Preparing to replace jenkins 1.480.3+dfsg-1~exp2 (using .../archives/jenkins_1.535_all.deb) ...
Unpacking replacement jenkins ...
dpkg: error processing /var/cache/apt/archives/jenkins_1.535_all.deb (--unpack):
trying to overwrite '/usr/share/jenkins/jenkins.war', which is also in package jenkins-common 1.480.3+dfsg-1~exp2
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
jenkins stop/waiting
Errors were encountered while processing:
/var/cache/apt/archives/jenkins_1.535_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
It seems that an older installation is blocking the install. I have tried to delete:
/var/lib/jenkins
/usr/share/jenkins/
Any ideas?
You need to uninstall the old Jenkins version via the package manager, not just delete the files; I'm not sure what will happen now that you've deleted some files, but you can try
sudo apt-get purge jenkins
Then try the install again.
In future, you should be able to use
sudo apt-get install jenkins
to install a new version and keep your configuration from the old version.
In my case(debian 7.0) this solution works well
$ mv /var/lib/dpkg/info/jenkins.* /tmp/
$ dpkg --remove --force-remove-reinstreq jenkins
$ dpkg --purge jenkins
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With