安装最新版本的jenkins时出现问题

在我的Ubuntu计算机上,我尝试在本地安装jenkins。我遵循了此指南:

https://wiki.jenkins-

ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu

但是当我运行时,出现sudo apt-get install jenkins此错误:

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)

似乎是较旧的安装阻止了安装。我试图删除:

/var/lib/jenkins

/usr/share/jenkins/

有任何想法吗?

回答:

您需要通过软件包管理器卸载旧的Jenkins版本,而不仅仅是删除文件。我不确定删除了一些文件后会发生什么,但是您可以尝试

sudo apt-get purge jenkins

然后再次尝试安装。

将来,您应该可以使用

sudo apt-get install jenkins

安装新版本并保持旧版本的配置不变。

以上是 安装最新版本的jenkins时出现问题 的全部内容, 来源链接: utcz.com/qa/413464.html

回到顶部