对于shell配置者,vagrant supressing non-zero exit staus
发布时间:2020-12-15 22:52:23 所属栏目:安全 来源:网络整理
导读:我在流浪汉中有一个脚本供应商.我的盒子是ubuntu 64bit Precise.我的脚本的相关行看起来像这样: sudo bash -c 'echo "deb https://oss.oracle.com/debian/ unstable main non-free" /etc/apt/sources.list.d/oracle.list'wget -q https://oss.oracle.com/el
我在流浪汉中有一个脚本供应商.我的盒子是ubuntu 64bit Precise.我的脚本的相关行看起来像这样:
sudo bash -c 'echo "deb https://oss.oracle.com/debian/ unstable main non-free" >/etc/apt/sources.list.d/oracle.list' wget -q https://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | sudo apt-key add - sudo apt-get update -qq 错误代码是: W: GPG error: https://oss.oracle.com unstable Release: The following signatures were invalid: KEYEXPIRED 1378511808 KEYEXPIRED 1378511808 KEYEXPIRED 1378511808 W: Failed to fetch https://oss.oracle.com/debian/dists/unstable/main/binary-amd64/Packages The requested URL returned error: 404 W: Failed to fetch https://oss.oracle.com/debian/dists/unstable/non-free/binary-amd64/Packages The requested URL returned error: 404 E: Some index files failed to download. They have been ignored,or old ones used instead. The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed! 问题是尽管我知道repo已经过期密钥而不是64位架构(仅限32位).我仍然希望从中安装相关的软件包(这是可能的,使用:< package_name>:i386). 有没有办法(无论是流浪汉还是在apt-get方面)让流浪汉开心并继续执行我的剧本? 解决方法
您可以使用以下命令将错误状态强制为零;真正:
sudo sh -c "apt-get update -qq ; true" (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |