![sudo apt-get install "libgcc1:i386" 在 Juju 安装钩子中失败,但手动可以](https://linux22.com/image/872277/sudo%20apt-get%20install%20%22libgcc1%3Ai386%22%20%E5%9C%A8%20Juju%20%E5%AE%89%E8%A3%85%E9%92%A9%E5%AD%90%E4%B8%AD%E5%A4%B1%E8%B4%A5%EF%BC%8C%E4%BD%86%E6%89%8B%E5%8A%A8%E5%8F%AF%E4%BB%A5.png)
我正在尝试通过我的 Juju 安装钩子安装“libgcc1:i386”,但命令失败并出现以下错误:
2015-05-26 08:59:23 INFO unit.wxs/0.install logger.go:40 sudo: unable to resolve host suchi-local-machine-26
2015-05-26 08:59:23 INFO unit.wxs/0.install logger.go:40 E: Unable to locate package libgcc1
2015-05-26 08:59:23 ERROR juju.worker.uniter.operation runhook.go:86 hook "install" failed: exit status 100
安装钩子中的代码如下:
sudo apt-get install libgcc1:i386
但是当我在 bash 提示符中尝试相同的命令时,它没有任何错误。一般来说,sudo apt-get install
当我尝试安装其他库时,它在安装钩子中工作。
环境详情:
Linux islrpbeixv665 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 14.04.2 LTS \n \l
echo $SHELL
/bin/sh
我的 Juju 环境是本地的。
~/charms/trusty/wxs/hooks$ juju status
environment: local
machines:
"0":
agent-state: started
agent-version: 1.22.1.1
dns-name: localhost
instance-id: localhost
series: trusty
state-server-member-status: has-vote
"28":
agent-state: started
agent-version: 1.22.1.1
dns-name: 10.0.3.18
instance-id: suchi-local-machine-28
series: trusty
hardware: arch=amd64
services:
wxs:
charm: local:trusty/wxs-21
exposed: false
units:
wxs/0:
agent-state: error
agent-state-info: 'hook failed: "install"'
agent-version: 1.22.1.1
machine: "26"
public-address: 10.0.3.77
谢谢