Apt

apt-get 提供 HTTP 403

  • January 22, 2014

我已經獲得了對沒有人使用的伺服器的訪問權限…我之前說過我們是一個沒有 SA 的研究小組,因此我們自己盲目地管理伺服器…通常我們會破壞它們或做一些愚蠢的事情。

所以對於最新的問題……

每當我嘗試安裝一個包時,一些標準的東西,例如 ruby​​ (sudo apt-get install ruby​​),一切都會開始載入。但最終我收到一條錯誤消息,說儲存庫或源目標不會讓我訪問目錄(給出 403)。

誰能告訴我如何重定向到可訪問的儲存庫。有問題的儲存庫實際上應該是可訪問的。

理想情況下,如果有人可以將我指向具有工作儲存庫的源文件,我會說謊。我們一直使用來自愛爾蘭的 HEANET 作為我們的安裝目錄,它始終可以在其他機器上執行!

我相信我們在 ubuntu 上,源文件本身似乎也在談論 Debian 軟體包。我剛剛添加了嘗試安裝的輸出。我已經執行了 apt-get update,這也會引發各種 403 錯誤。

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
ruby1.8
Suggested packages:
ri ruby-dev ruby1.8-examples ri1.8
The following NEW packages will be installed:
ruby ruby1.8
0 upgraded, 2 newly installed, 0 to remove and 28 not upgraded.
Need to get 54.1 kB of archives.
After this operation, 295 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
WARNING: The following packages cannot be authenticated!
ruby1.8 ruby
Install these packages without verification [y/N]? Y
Err http://ie.archive.ubuntu.com/ubuntu/ natty/main ruby1.8 amd64 1.8.7.302-2
403  Forbidden [IP: 136.206.1.20 8080]
Err http://ie.archive.ubuntu.com/ubuntu/ natty/main ruby all 4.5
403  Forbidden [IP: 136.206.1.20 8080]
Failed to fetch http://ie.archive.ubuntu.com/ubuntu/pool/main/r/ruby1.8/ruby1.8_1.8.7.302-2_amd64.deb  403  Forbidden [IP: 136.206.1.20 8080]
Failed to fetch http://ie.archive.ubuntu.com/ubuntu/pool/main/r/ruby-defaults/ruby_4.5_all.deb  403  Forbidden [IP: 136.206.1.20 8080]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

您位於 136.206.1.20 的(透明)代理阻止了您的請求。查看那裡的日誌,重新配置它,禁用它或將行更改為/etc/apt/apt.conf在其他電腦上工作的值。

/etc/apt/apt.conf:

Acquire::http::proxy "http://proxy-ip:proxy-port";

引用自:https://serverfault.com/questions/318989