LoginSignup
1

More than 5 years have passed since last update.

WSL Ubuntuにてプロキシ越しのapt-getに失敗した場合

Posted at

問題

会社PCにてWSLよりapt-getした際に失敗する

解決方法

apt設定ファイルに記載する

$ sudo vi /etc/apt/apt.conf
※ ファイルが無い場合は作成して記載すれば良い

/etc/apt/apt.confに記載する内容

Acquire::ftp::proxy "ftp://192.168.0.1:8080/";
Acquire::http::proxy "http://192.168.0.1:8080/";
Acquire::https::proxy "https://192.168.0.1:8080/";

結果

OK!

$ sudo apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [187 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:6 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [72.7 kB]
.......

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1