从 ubuntu 12.04 升级到 14.04 后无法安装/恢复 jenkins

从 ubuntu 12.04 升级到 14.04 后无法安装/恢复 jenkins

我将 Ubuntu 从 12.04 升级到了 14.04,惊讶地发现我之前安装和配置的 jenkins 坏了。更糟糕的是,如果我执行 或apt-get install jenkinsapt-cache search jenkins我看不到jenkinsjenkins-clijenkins-common

如果我执行apt-get install jenkins,我会收到错误:

buildman@pluto:~$ sudo apt-get install jenkins
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package jenkins is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'jenkins' has no installation candidate

我的操作系统详细信息:

buildman@pluto:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.1 LTS
Release:    14.04
Codename:   trusty

任何关于如何摆脱(我造成的)混乱的指点都会有很大帮助。

答案1

Jenkins 已从 Trusty 的官方 Ubuntu 存储库中删除。原因如下:https://bugs.launchpad.net/ubuntu/+source/jenkins/+bug/1294005,但简而言之,从现在开始,如果您使用上游存储库,它会更安全,也更容易保持最新状态。有关如何做到这一点的详细信息,请访问https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu

答案2

安装 jenikin

wget -q -O -https://jenkins-ci.org/debian/jenkins-ci.org.key| sudo apt-key 添加 -

sudo sh -c '回显 debhttp://pkg.jenkins-ci.org/debian二进制/> / > /etc/apt/sources.list.d/jenkins.list'

sudo apt-get 更新

sudo apt-get 安装 jenkins

http://本地主机:8080

sudo cat /var/lib/jenkins/secrets/initialAdminPassword (获取管理员密码)

sudo apt-get 更新

sudo apt-get 安装 jenkins

你可以跳过最后两行但我是按照这种方式做的

相关内容