1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Raspberrypi3B+にJenkinsをインストール

Posted at

インストール

wiki.jenkins.ioのInstallationを参照する。

wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins

確認

その後、webブラウザから、localhost:8080 にアクセスしてJenkinsのWebUIが表示されればOK.

Unlock Jenkinsは以下のパスワードを貼り付けて解決

sudo cat /var/lib/jenkins/secrets/initialAdminPassword

jenkins[17325]: ERROR: No Java executable found in current PATH

javaがないためエラー

$ sudo apt-get install jenkins
...
jenkins[17325]: ERROR: No Java executable found in current PATH

javaをインストールして解決

sudo apt-get install openjdk-8-jdk openjdk-8-jre

E: Sub-process /usr/bin/dpkg returned an error code (1)

以下のエラーが出た

処理中にエラーが発生しました:
 jenkins
E: Sub-process /usr/bin/dpkg returned an error code (1)

原因を確認

$ sudo dpkg --audit
以下のパッケージは最初の設定中に問題が発生したため、設定が終了していません。
dpkg --configure <パッケージ> か dselect で設定 (configure) メニューオプショ
ンを使って設定作業を再試行しなければなりません:
 jenkins              Jenkins is an open source automation server which enables

再configure

sudo rm /var/lib/dpkg/info/jenkins.postinst 
pi@raspberrypi:/var/www/html $ sudo rm /var/lib/dpkg/info/jenkins.postrm
pi@raspberrypi:/var/www/html $ sudo rm /var/lib/dpkg/info/jenkins.prerm
sudo dpkg --configure jenkins

以下を実行して解決

$ sudo dpkg --configure jenkins
jenkins (2.222.3) を設定しています ...

参考

wiki.jenkins.io
UbuntuにJenkinsをインストールする
Raspberry PiにJenkinsをインストールしてブラウザ接続まで
RaspberryPiにJenkinsを入れて高級なcronの代わりに使う
Jenkinsをdocker上に構築
(当たり前のことだけど) Jenkins を入れる前に Java を入れよう
dpkgやapt-get関連でエラーが出た時の対処法

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?