Apt-get connection problem - "failed to resolf askubuntu-proxy.com"

Asked by dragoledino on 2016-07-01

My apt-get utilitary does not seem to work anymore since I've come to the US (it worked fine in Europe).
I am on a wifi connection.

Here is the list of commands that the Troubleshooting procedure told me to do :

root@alexandru-HP-ZBook-15-G2:/etc#
root@alexandru-HP-ZBook-15-G2:/etc# ubuntu-support-status
Résumé de l'état du support de « alexandru-HP-ZBook-15-G2 » :

Vous avez 1785 paquets (100.0%) qui ne peuvent pas ou plus être téléchargés
Vous avez 0 paquets (0.0%) qui ne sont pas pris en charge

Exécuter avec --show-unsupported, --show-supported ou --show-all pour voir plus de détails
root@alexandru-HP-ZBook-15-G2:/etc# cat /etc/dpkg/dpkg.cfg.d/multiarch
cat: /etc/dpkg/dpkg.cfg.d/multiarch: Aucun fichier ou dossier de ce type
root@alexandru-HP-ZBook-15-G2:/etc# dpkg --print-foreign-architectures
i386
root@alexandru-HP-ZBook-15-G2:/etc# sudo grep -R proxy /etc/apt/*
/etc/apt/apt.conf.d/01proxy:Acquire::http::Proxy "http://askubuntu-proxy.com:8080";
root@alexandru-HP-ZBook-15-G2:/etc# grep proxy /etc/environment
root@alexandru-HP-ZBook-15-G2:/etc# echo $http_proxy

root@alexandru-HP-ZBook-15-G2:/etc# echo $ftp_proxy

root@alexandru-HP-ZBook-15-G2:/etc# grep proxy /etc/bash.bashrc
root@alexandru-HP-ZBook-15-G2:/etc# grep proxy ~/.bashrc
root@alexandru-HP-ZBook-15-G2:/etc# cat /etc/apt/apt.conf
root@alexandru-HP-ZBook-15-G2:/etc# sudo fuser -vvv /var/lib/dpkg/lock
root@alexandru-HP-ZBook-15-G2:/etc# sudo fuser -vvv /var/cache/apt/archives/lock
root@alexandru-HP-ZBook-15-G2:/etc# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS"
root@alexandru-HP-ZBook-15-G2:/etc# uname -a
Linux alexandru-HP-ZBook-15-G2 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
root@alexandru-HP-ZBook-15-G2:/etc# sudo rm /var/lib/apt/lists/lock
root@alexandru-HP-ZBook-15-G2:/etc# sudo rm /var/cache/apt/archives/lock
root@alexandru-HP-ZBook-15-G2:/etc# sudo rm /var/lib/dpkg/lock
root@alexandru-HP-ZBook-15-G2:/etc# sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
root@alexandru-HP-ZBook-15-G2:/etc# sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
root@alexandru-HP-ZBook-15-G2:/etc# sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status || sudo cp /var/backups/apt.extended_states.0 /var/lib/dpkg/status
root@alexandru-HP-ZBook-15-G2:/etc# sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
root@alexandru-HP-ZBook-15-G2:/etc# sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
cp: impossible d'évaluer '/var/lib/dpkg/available-old': Aucun fichier ou dossier de ce type
root@alexandru-HP-ZBook-15-G2:/etc# sudo rm -rf /var/lib/dpkg/updates/*
root@alexandru-HP-ZBook-15-G2:/etc# sudo rm -rf /var/lib/apt/lists
root@alexandru-HP-ZBook-15-G2:/etc# sudo rm /var/cache/apt/*.bin
root@alexandru-HP-ZBook-15-G2:/etc# sudo mkdir /var/lib/apt/lists
root@alexandru-HP-ZBook-15-G2:/etc# sudo mkdir /var/lib/apt/lists/partial
root@alexandru-HP-ZBook-15-G2:/etc# LANG=C;sudo apt-get clean
root@alexandru-HP-ZBook-15-G2:/etc# LANG=C;sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
root@alexandru-HP-ZBook-15-G2:/etc# sudo dpkg --configure -a
root@alexandru-HP-ZBook-15-G2:/etc# sudo dpkg --clear-avail
root@alexandru-HP-ZBook-15-G2:/etc# LANG=C;sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@alexandru-HP-ZBook-15-G2:/etc# LANG=C;sudo apt-get --fix-missing install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@alexandru-HP-ZBook-15-G2:/etc# LANG=C;sudo apt-get --purge autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@alexandru-HP-ZBook-15-G2:/etc# LANG=C;sudo apt-get --fix-missing update -o APT::Cache-Limit=100000000
Err:1 http://archive.ubuntu.com/ubuntu xenial InRelease
  Could not resolve 'askubuntu-proxy.com'
Err:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
  Could not resolve 'askubuntu-proxy.com'
Err:3 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
  Could not resolve 'askubuntu-proxy.com'
Err:4 http://archive.ubuntu.com/ubuntu xenial-security InRelease
  Could not resolve 'askubuntu-proxy.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease Could not resolve 'askubuntu-proxy.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease Could not resolve 'askubuntu-proxy.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease Could not resolve 'askubuntu-proxy.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-security/InRelease Could not resolve 'askubuntu-proxy.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@alexandru-HP-ZBook-15-G2:/etc# LANG=C;sudo apt-get update -o APT::Cache-Limit=100000000 && sudo apt-get dist-upgrade
Err:1 http://archive.ubuntu.com/ubuntu xenial InRelease
  Could not resolve 'askubuntu-proxy.com'
Err:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
  Could not resolve 'askubuntu-proxy.com'
Err:3 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
  Could not resolve 'askubuntu-proxy.com'
Err:4 http://archive.ubuntu.com/ubuntu xenial-security InRelease
  Could not resolve 'askubuntu-proxy.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease Could not resolve 'askubuntu-proxy.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease Could not resolve 'askubuntu-proxy.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease Could not resolve 'askubuntu-proxy.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-security/InRelease Could not resolve 'askubuntu-proxy.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@alexandru-HP-ZBook-15-G2:/etc# find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;

/etc/apt/sources.list

     1 # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
     2
     3 # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
     4 # newer versions of the distribution.
     5 deb http://archive.ubuntu.com/ubuntu xenial main restricted
     6 # deb-src http://fr.archive.ubuntu.com/ubuntu/ xenial main restricted
     7
     8 ## Major bug fix updates produced after the final release of the
     9 ## distribution.
    10 deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted
    11 # deb-src http://fr.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
    12
    13 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    14 ## team, and may not be under a free licence. Please satisfy yourself as to
    15 ## your rights to use the software. Also, please note that software in
    16 ## universe WILL NOT receive any review or updates from the Ubuntu security
    17 ## team.
    18 deb http://archive.ubuntu.com/ubuntu xenial universe
    19 # deb-src http://fr.archive.ubuntu.com/ubuntu/ xenial universe
    20 deb http://archive.ubuntu.com/ubuntu xenial-updates universe
    21 # deb-src http://fr.archive.ubuntu.com/ubuntu/ xenial-updates universe
    22
    23 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    24 ## team, and may not be under a free licence. Please satisfy yourself as to
    25 ## your rights to use the software. Also, please note that software in
    26 ## multiverse WILL NOT receive any review or updates from the Ubuntu
    27 ## security team.
    28 deb http://archive.ubuntu.com/ubuntu xenial multiverse
    29 # deb-src http://fr.archive.ubuntu.com/ubuntu/ xenial multiverse
    30 deb http://archive.ubuntu.com/ubuntu xenial-updates multiverse
    31 # deb-src http://fr.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
    32
    33 ## N.B. software from this repository may not have been tested as
    34 ## extensively as that contained in the main release, although it includes
    35 ## newer versions of some applications which may provide useful features.
    36 ## Also, please note that software in backports WILL NOT receive any review
    37 ## or updates from the Ubuntu security team.
    38 deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
    39 # deb-src http://fr.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
    40
    41 ## Uncomment the following two lines to add software from Canonical's
    42 ## 'partner' repository.
    43 ## This software is not part of Ubuntu, but is offered by Canonical and the
    44 ## respective vendors as a service to Ubuntu users.
    45 # deb http://archive.canonical.com/ubuntu xenial partner
    46 # deb-src http://archive.canonical.com/ubuntu xenial partner
    47
    48 deb http://archive.ubuntu.com/ubuntu xenial-security main restricted
    49 # deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
    50 deb http://archive.ubuntu.com/ubuntu xenial-security universe
    51 # deb-src http://security.ubuntu.com/ubuntu xenial-security universe
    52 deb http://archive.ubuntu.com/ubuntu xenial-security multiverse
    53 # deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse

/etc/apt/sources.list.d/webupd8team-ubuntu-brackets-xenial.list

     1 # deb http://ppa.launchpad.net/webupd8team/brackets/ubuntu xenial main
     2 # deb-src http://ppa.launchpad.net/webupd8team/brackets/ubuntu xenial main
     3 # deb-src http://ppa.launchpad.net/webupd8team/brackets/ubuntu xenial main
root@alexandru-HP-ZBook-15-G2:/etc# sudo dpkg --audit
root@alexandru-HP-ZBook-15-G2:/etc#

Thanks very much !

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
dragoledino
Solved:
2016-07-01
Last query:
2016-07-01
Last reply:
2016-07-01

What is the output of:

ping askubuntu-proxy.com

Thanks

Manfred Hampl (m-hampl) said : #2

The definition in /etc/apt/apt.conf.d/01proxy 'Acquire::http::Proxy "http://askubuntu-proxy.com:8080";' seems weird do me.
I am not aware that a proxy server with such name does exist.

Who told you to put this proxy definition into the apt configuration files?

Do you need a proxy server to access the internet? How is the internet access defined for your web browser?

What is the output of the command
cat -n /etc/apt/apt.conf.d/01proxy

>ping askubuntu-proxy.com
Ping request could not find host askubuntu-proxy.com. Please check the name and try again.

>telnet askubuntu-proxy.com 8080
Connecting To askubuntu-proxy.com...Could not open connection to the host, on port 8080: Connect failed

The proxy doesn't exist.

Where did you get this proxy from? It's gibberish

dragoledino (alexdrg08) said : #4

I never put any specific proxy on my computer, it simply apeared by himself...
How do I get rid of it ?

My web browser doesn't use any proxy.

Thank you !

Run:

sudo gedit /etc/apt/apt.conf.d/01proxy

Find this line:
Acquire::http::Proxy "http://askubuntu-proxy.com:8080";

Change it to:
#Acquire::http::Proxy "http://askubuntu-proxy.com:8080";

Save the new file, close gedit and run:
sudo apt-get update

dragoledino (alexdrg08) said : #6

Worked perfectly thanks !