apt-get update reports check internet connection

Asked by Stefano on 2016-12-10

This is the output I get when running diagnostic commands:

stefano@stefano-K61IC:~$ ubuntu-support-status
Riepilogo supporto per «stefano-K61IC»:

Ci sono 1910 pacchetti (100.0%) non più scaricabili
Ci sono 0 pacchetti (0.0%) non supportati

Eseguire con --show-unsupported, --show-supported o --show-all per ulteriori dettagli
stefano@stefano-K61IC:~$ cat /etc/dpkg/dpkg.cfg.d/multiarch
cat: /etc/dpkg/dpkg.cfg.d/multiarch: File o directory non esistente
stefano@stefano-K61IC:~$ dpkg --print-foreign-architectures
i386
stefano@stefano-K61IC:~$ sudo grep -R proxy /etc/apt/*
[sudo] password di stefano:
stefano@stefano-K61IC:~$ grep proxy /etc/environment
stefano@stefano-K61IC:~$ echo $http_proxy

stefano@stefano-K61IC:~$ echo $ftp_proxy

stefano@stefano-K61IC:~$ grep proxy /etc/bash.bashrc
stefano@stefano-K61IC:~$ grep proxy ~/.bashrc
stefano@stefano-K61IC:~$ cat /etc/apt/apt.conf
cat: /etc/apt/apt.conf: File o directory non esistente
stefano@stefano-K61IC:~$ sudo fuser -vvv /var/lib/dpkg/lock
stefano@stefano-K61IC:~$ sudo fuser -vvv /var/cache/apt/archives/lock
stefano@stefano-K61IC:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.10
DISTRIB_CODENAME=yakkety
DISTRIB_DESCRIPTION="Ubuntu 16.10"
stefano@stefano-K61IC:~$ uname -a
Linux stefano-K61IC 4.8.0-22-generic #24-Ubuntu SMP Sat Oct 8 09:15:00 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
stefano@stefano-K61IC:~$ sudo rm /var/lib/apt/lists/lock
stefano@stefano-K61IC:~$ sudo rm /var/cache/apt/archives/lock
stefano@stefano-K61IC:~$ sudo rm /var/lib/dpkg/lock
stefano@stefano-K61IC:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
stefano@stefano-K61IC:~$ sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
stefano@stefano-K61IC:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status || sudo cp /var/backups/apt.extended_states.0 /var/lib/dpkg/status
stefano@stefano-K61IC:~$ sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
stefano@stefano-K61IC:~$
stefano@stefano-K61IC:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
cp: impossibile eseguire stat di '/var/lib/dpkg/available-old': File o directory non esistente
stefano@stefano-K61IC:~$
stefano@stefano-K61IC:~$ sudo rm -rf /var/lib/dpkg/updates/*
stefano@stefano-K61IC:~$
stefano@stefano-K61IC:~$ sudo rm -rf /var/lib/apt/lists
stefano@stefano-K61IC:~$
stefano@stefano-K61IC:~$ sudo rm /var/cache/apt/*.bin
stefano@stefano-K61IC:~$
stefano@stefano-K61IC:~$ sudo mkdir /var/lib/apt/lists
stefano@stefano-K61IC:~$
stefano@stefano-K61IC:~$ sudo mkdir /var/lib/apt/lists/partial
stefano@stefano-K61IC:~$
stefano@stefano-K61IC:~$ LANG=C;sudo apt-get clean
stefano@stefano-K61IC:~$
stefano@stefano-K61IC:~$ LANG=C;sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
stefano@stefano-K61IC:~$
stefano@stefano-K61IC:~$ sudo dpkg --configure -a
stefano@stefano-K61IC:~$
stefano@stefano-K61IC:~$ sudo dpkg --clear-avail
stefano@stefano-K61IC:~$
stefano@stefano-K61IC:~$ LANG=C;sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libappindicator1 libindicator7 libpango1.0-0 libpangox-1.0-0
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
stefano@stefano-K61IC:~$
stefano@stefano-K61IC:~$ LANG=C;sudo apt-get --fix-missing install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libappindicator1 libindicator7 libpango1.0-0 libpangox-1.0-0
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
stefano@stefano-K61IC:~$
stefano@stefano-K61IC:~$ LANG=C;sudo apt-get --purge autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  libappindicator1* libindicator7* libpango1.0-0* libpangox-1.0-0*
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
After this operation, 545 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 168771 files and directories currently installed.)
Removing libappindicator1 (12.10.1+16.10.20160905-0ubuntu1) ...
Removing libindicator7 (16.10.0+16.10.20160913-0ubuntu1) ...
Removing libpango1.0-0:amd64 (1.40.1-1ubuntu1) ...
Removing libpangox-1.0-0:amd64 (0.0.2-5) ...
Processing triggers for libc-bin (2.24-3ubuntu1) ...
(Reading database ... 168746 files and directories currently installed.)
Removing libpangox-1.0-0:amd64 (0.0.2-5) ...
Purging configuration files for libpangox-1.0-0:amd64 (0.0.2-5) ...
stefano@stefano-K61IC:~$ LANG=C;sudo apt-get --fix-missing update -o APT::Cache-Limit=100000000
Err:1 http://archive.ubuntu.com/ubuntu yakkety InRelease
  Could not resolve 'archive.ubuntu.com'
Err:2 http://archive.ubuntu.com/ubuntu yakkety-updates InRelease
  Could not resolve 'archive.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu yakkety-backports InRelease
  Could not resolve 'archive.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu yakkety-security InRelease
  Could not resolve 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/yakkety/InRelease Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/yakkety-updates/InRelease Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/yakkety-backports/InRelease Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/yakkety-security/InRelease Could not resolve 'archive.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
stefano@stefano-K61IC:~$ 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.10 _Yakkety Yak_ - Release amd64 (20161012.2)]/ yakkety 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 yakkety main restricted
     6 # deb-src http://it.archive.ubuntu.com/ubuntu/ yakkety main restricted
     7
     8 ## Major bug fix updates produced after the final release of the
     9 ## distribution.
    10 deb http://archive.ubuntu.com/ubuntu yakkety-updates main restricted
    11 # deb-src http://it.archive.ubuntu.com/ubuntu/ yakkety-updates main restricted
    12
    13 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    14 ## team. Also, please note that software in universe WILL NOT receive any
    15 ## review or updates from the Ubuntu security team.
    16 deb http://archive.ubuntu.com/ubuntu yakkety universe
    17 # deb-src http://it.archive.ubuntu.com/ubuntu/ yakkety universe
    18 deb http://archive.ubuntu.com/ubuntu yakkety-updates universe
    19 # deb-src http://it.archive.ubuntu.com/ubuntu/ yakkety-updates universe
    20
    21 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    22 ## team, and may not be under a free licence. Please satisfy yourself as to
    23 ## your rights to use the software. Also, please note that software in
    24 ## multiverse WILL NOT receive any review or updates from the Ubuntu
    25 ## security team.
    26 deb http://archive.ubuntu.com/ubuntu yakkety multiverse
    27 # deb-src http://it.archive.ubuntu.com/ubuntu/ yakkety multiverse
    28 deb http://archive.ubuntu.com/ubuntu yakkety-updates multiverse
    29 # deb-src http://it.archive.ubuntu.com/ubuntu/ yakkety-updates multiverse
    30
    31 ## N.B. software from this repository may not have been tested as
    32 ## extensively as that contained in the main release, although it includes
    33 ## newer versions of some applications which may provide useful features.
    34 ## Also, please note that software in backports WILL NOT receive any review
    35 ## or updates from the Ubuntu security team.
    36 deb http://archive.ubuntu.com/ubuntu yakkety-backports main restricted universe multiverse
    37 # deb-src http://it.archive.ubuntu.com/ubuntu/ yakkety-backports main restricted universe multiverse
    38
    39 ## Uncomment the following two lines to add software from Canonical's
    40 ## 'partner' repository.
    41 ## This software is not part of Ubuntu, but is offered by Canonical and the
    42 ## respective vendors as a service to Ubuntu users.
    43 # deb http://archive.canonical.com/ubuntu yakkety partner
    44 # deb-src http://archive.canonical.com/ubuntu yakkety partner
    45
    46 deb http://archive.ubuntu.com/ubuntu yakkety-security main restricted
    47 # deb-src http://security.ubuntu.com/ubuntu yakkety-security main restricted
    48 deb http://archive.ubuntu.com/ubuntu yakkety-security universe
    49 # deb-src http://security.ubuntu.com/ubuntu yakkety-security universe
    50 deb http://archive.ubuntu.com/ubuntu yakkety-security multiverse
    51 # deb-src http://security.ubuntu.com/ubuntu yakkety-security multiverse

/etc/apt/sources.list.d/google-chrome.list

     1 ### THIS FILE IS AUTOMATICALLY CONFIGURED ###
     2 # You may comment out this entry, but any other modifications may be lost.
     3 # deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
stefano@stefano-K61IC:~$ sudo dpkg --audit
stefano@stefano-K61IC:~$

My internet connection is fine, can you help me?

Thanks,

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
2016-12-10
Last query:
2016-12-10
Last reply:
2016-12-10

If you reboot your router then your PC and run:

sudo apt-get update

Is it OK?

Stefano (cmarlowe) said : #2

Thanks actionparsnip, that solved my question.

Your router is a computer. It needs rebooting occasionally.