我正在尝试获取特定的存储库来安装 php 版本,但我一直收到 404 NOT FOUND。
厨师菜谱代码:
apt_repository "dotdeb-php54" do
uri "http://archives.dotdeb.org"
distribution "squeeze"
components ["php5/5.4.8"]
key "http://www.dotdeb.org/dotdeb.gpg"
end
尝试获取:http://archives.dotdeb.org/dists/squeeze/php5/5.4.8
但出现以下错误:
Err http://archives.dotdeb.org squeeze/php5/5.4.8 amd64 Packages
404 Not Found
Hit http://security.ubuntu.com precise-security/main Translation-en
Hit http://security.ubuntu.com precise-security/multiverse Translation-en
Hit http://security.ubuntu.com precise-security/restricted Translation-en
Err http://archives.dotdeb.org squeeze/php5/5.4.8 i386 Packages
404 Not Found
Hit http://security.ubuntu.com precise-security/universe Translation-en
Ign http://archives.dotdeb.org squeeze/php5/5.4.8 Translation-en
STDERR: W: Failed to fetch http://archives.dotdeb.org/dists/squeeze/php5/5.4.8/binary-amd64/Packages 404 Not Found
但以下有效:
apt_repository "dotdeb-php54" do
uri "http://packages.dotdeb.org"
distribution "squeeze-php54"
components ["all"]
key "http://www.dotdeb.org/dotdeb.gpg"
end
答案1
问题不在于 Chef。请检查您使用的 URL,然后尝试apt-get
手动运行命令,然后更新您的配方。404 表示未找到文件,此错误代码由 dotdeb 网络服务器返回。
我尝试在浏览器中打开该 URL,但它不存在。