[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
ただいまコメントを受けつけておりません。
会社の PC (Ubuntu) に Jenkins を入れようとした。が、うまくいかない。E: Sub-process /usr/bin/dpkg returned an error code (1) と怒られる。
$ sudo apt-get install jenkins Reading package lists... Done Building dependency tree Reading state information... Done jenkins is already the newest version (2.121.1). The following packages were automatically installed and are no longer required: linux-headers-4.4.0-101 linux-headers-4.4.0-101-generic linux-headers-4.4.0-104 linux-headers-4.4.0-104-generic linux-headers-4.4.0-108 linux-headers-4.4.0-108-generic linux-headers-4.4.0-109 linux-headers-4.4.0-109-generic linux-headers-4.4.0-112 linux-headers-4.4.0-112-generic linux-headers-4.4.0-119 linux-headers-4.4.0-119-generic linux-headers-4.4.0-121 linux-headers-4.4.0-121-generic linux-headers-4.4.0-124 linux-headers-4.4.0-124-generic linux-image-4.4.0-101-generic linux-image-4.4.0-103-generic linux-image-4.4.0-104-generic linux-image-4.4.0-108-generic linux-image-4.4.0-109-generic linux-image-4.4.0-112-generic linux-image-4.4.0-119-generic linux-image-4.4.0-121-generic linux-image-4.4.0-124-generic Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 148 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] Setting up jenkins (2.121.1) ... Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details. invoke-rc.d: initscript jenkins, action "start" failed. dpkg: error processing package jenkins (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: jenkins E: Sub-process /usr/bin/dpkg returned an error code (1)
ログから何となくわかる通り、Jenkins の設定中にうまくいかなかったようだ。
$ dpkg -l jenkins Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-=======================-================-================-=================================================== iF jenkins 2.121.1 all Jenkins is an open source automation server which e
原因は /var/log/syslog を確認したらすぐに分かった。No Java executable found in current PATH だそうだ。apt 実行時のログに出ないのでスッと分からなかったが、冷静に考えればそりゃそうである。
$ cat syslog systemd[1]: Starting LSB: Start Jenkins at boot time... jenkins[22149]: ERROR: No Java executable found in current PATH: /bin:/usr/bin:/sbin:/usr/sbin jenkins[22149]: If you actually have java installed on the system make sure the executable is in the aforementioned path and that 'type -p java' returns the java executable path
ただいまコメントを受けつけておりません。