I am updating my ubuntu using sudo apt-get update but its not updating i try lot of time but i colud not find any solution just guid me how i can fix it.

Asked by saif ullah

saif@saif-Inspiron-3542:~$ sudo apt-get update
[sudo] password for saif:
Err:1 http://archive.ubuntu.com/ubuntu eoan InRelease
  Connection failed [IP: 91.189.88.152 80]
Err:2 http://archive.canonical.com/ubuntu eoan InRelease
  Connection failed [IP: 91.189.91.15 80]
Reading package lists... Done
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/eoan/InRelease Connection failed [IP: 91.189.91.15 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/eoan/InRelease Connection failed [IP: 91.189.88.152 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
saif@saif-Inspiron-3542:~$ ubuntu-support-status
Support status summary of 'saif-Inspiron-3542':

You have 1589 packages (100.0%) that can not/no-longer be downloaded
You have 0 packages (0.0%) that are unsupported

Run with --show-unsupported, --show-supported or --show-all to see more details
saif@saif-Inspiron-3542:~$ cat /etc/dpkg/dpkg.cfg.d/multiarch
cat: /etc/dpkg/dpkg.cfg.d/multiarch: No such file or directory
saif@saif-Inspiron-3542:~$ ls
Desktop Documents Downloads Music Pictures Public Templates Videos
saif@saif-Inspiron-3542:~$ cd /etc
saif@saif-Inspiron-3542:/etc$ cd dpkg
saif@saif-Inspiron-3542:/etc/dpkg$ cd dpkg.cfg.d
saif@saif-Inspiron-3542:/etc/dpkg/dpkg.cfg.d$ cd multiarch
bash: cd: multiarch: No such file or directory
saif@saif-Inspiron-3542:/etc/dpkg/dpkg.cfg.d$ cd !
bash: cd: !: No such file or directory
saif@saif-Inspiron-3542:/etc/dpkg/dpkg.cfg.d$ cd ~
saif@saif-Inspiron-3542:~$ sudo bash -c 'echo "foreign-architecture i386" >>/etc/dpkg/dpkg.cfg.d/multiarch'
[sudo] password for saif:
saif@saif-Inspiron-3542:~$ cat /etc/dpkg/dpkg.cfg.d/multiarch
foreign-architecture i386
saif@saif-Inspiron-3542:~$ cat /etc/dpkg/dpkg/cfg.d/multiarch
cat: /etc/dpkg/dpkg/cfg.d/multiarch: No such file or directory
saif@saif-Inspiron-3542:~$ sudo bash -c 'echo "foreign-architecture i386" >>/etc/dpkg/dpkg.cfg.d/multiarch'
saif@saif-Inspiron-3542:~$ sudo cat /etc/dpkg/dpkg/cfg.d/multiarch
cat: /etc/dpkg/dpkg/cfg.d/multiarch: No such file or directory
saif@saif-Inspiron-3542:~$ cat /etc/dpkg/dpkg.cfg.d/multiarch
foreign-architecture i386
foreign-architecture i386
saif@saif-Inspiron-3542:~$ dpkg --print-foreign-architectures
dpkg: error: configuration error: /etc/dpkg/dpkg.cfg.d/multiarch:1: unknown option 'foreign-architecture'
saif@saif-Inspiron-3542:~$ sudo dpkg --print-foreign-architectures
dpkg: error: configuration error: /etc/dpkg/dpkg.cfg.d/multiarch:1: unknown option 'foreign-architecture'
saif@saif-Inspiron-3542:~$ cat /etc/dpkg/dpkg.cfg.d/multiarch
foreign-architecture i386
foreign-architecture i386
saif@saif-Inspiron-3542:~$ dpkg --print-foreign-architectures i386
dpkg: error: configuration error: /etc/dpkg/dpkg.cfg.d/multiarch:1: unknown option 'foreign-architecture'
saif@saif-Inspiron-3542:~$ sudo grep -R roxy /etc/apt/*
saif@saif-Inspiron-3542:~$ grep roxy /etc/environment
saif@saif-Inspiron-3542:~$ echo $http_proxy

saif@saif-Inspiron-3542:~$ echo $ftp_proxy

saif@saif-Inspiron-3542:~$ grep roxy /etc/bash.bashrc
saif@saif-Inspiron-3542:~$ grep roxy ~/.bashrc
saif@saif-Inspiron-3542:~$ cat /etc/apt/apt.conf
cat: /etc/apt/apt.conf: No such file or directory
saif@saif-Inspiron-3542:~$ sudo fuser -vvv /var/lib/dpkg/lock
saif@saif-Inspiron-3542:~$ sudo fuser -vvv /var/cache/apt/archives/lock
saif@saif-Inspiron-3542:~$ sudo fuser -vvv /var/cache/apt/archives/lock
saif@saif-Inspiron-3542:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=19.10
DISTRIB_CODENAME=eoan
DISTRIB_DESCRIPTION="Ubuntu 19.10"
saif@saif-Inspiron-3542:~$ uname -a
Linux saif-Inspiron-3542 5.3.0-18-generic #19-Ubuntu SMP Tue Oct 8 20:14:06 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
saif@saif-Inspiron-3542:~$ sudo rm /var/lib/apt/lists/lock
saif@saif-Inspiron-3542:~$ sudo rm /var/cache/apt/archives/lock
saif@saif-Inspiron-3542:~$ sudo rm /var/lib/dpkg/lock
saif@saif-Inspiron-3542:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
saif@saif-Inspiron-3542:~$ sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
saif@saif-Inspiron-3542:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status || sudo cp /var/backups/dpkg.status.0 /var/lib/dpkg/status
saif@saif-Inspiron-3542:~$ sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
saif@saif-Inspiron-3542:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
cp: cannot stat '/var/lib/dpkg/available-old': No such file or directory
saif@saif-Inspiron-3542:~$ sudo rm -rf /var/lib/dpkg/updates/*
saif@saif-Inspiron-3542:~$ sudo rm -rf /var/lib/apt/lists
saif@saif-Inspiron-3542:~$ sudo rm /var/cache/apt/*.bin
saif@saif-Inspiron-3542:~$ sudo mkdir /var/lib/apt/lists
saif@saif-Inspiron-3542:~$ sudo mkdir /var/lib/apt/lists/partial
saif@saif-Inspiron-3542:~$ LANG=C;sudo apt-get clean
saif@saif-Inspiron-3542:~$ LANG=C;sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
saif@saif-Inspiron-3542:~$ sudo dpkg --configure -a
dpkg: error: configuration error: /etc/dpkg/dpkg.cfg.d/multiarch:1: unknown option 'foreign-architecture'
saif@saif-Inspiron-3542:~$ sudo dpkg --clear-avail
dpkg: error: configuration error: /etc/dpkg/dpkg.cfg.d/multiarch:1: unknown option 'foreign-architecture'
saif@saif-Inspiron-3542:~$ 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.
saif@saif-Inspiron-3542:~$ 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.
saif@saif-Inspiron-3542:~$ 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.
saif@saif-Inspiron-3542:~$ LANG=C;sudo apt-get --fix-missing update -o APT::Cache-Limit=100000000
Err:1 http://archive.ubuntu.com/ubuntu eoan InRelease Connection failed [IP: 91.189.88.142 80]
Err:2 http://archive.canonical.com/ubuntu eoan InRelease
  Connection failed [IP: 91.189.92.191 80]
Reading package lists... Done
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/eoan/InRelease Connection failed [IP: 91.189.92.191 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/eoan/InRelease Connection failed [IP: 91.189.88.142 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
saif@saif-Inspiron-3542:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=100000000 && sudo apt-get dist-upgrade
Err:1 http://archive.ubuntu.com/ubuntu eoan InRelease
  Connection failed [IP: 91.189.88.152 80]
Err:2 http://archive.canonical.com/ubuntu eoan InRelease
  Connection failed [IP: 91.189.92.150 80]
Reading package lists... Done
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/eoan/InRelease Connection failed [IP: 91.189.92.150 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/eoan/InRelease Connection failed [IP: 91.189.88.152 80]
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.
saif@saif-Inspiron-3542:~$ find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;

/etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-eoan.list

     1 # deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu eoan main
     2 # deb-src http://ppa.launchpad.net/deadsnakes/ppa/ubuntu eoan main

/etc/apt/sources.list

     1 # deb cdrom:[Ubuntu 19.10 _Eoan Ermine_ - Release amd64 (20191017)]/ eoan main restricted
     2
     3 # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
     4 # newer versions of the distribution.
     5 # deb-src http://pk.archive.ubuntu.com/ubuntu/ eoan main restricted
     6
     7 ## Major bug fix updates produced after the final release of the
     8 ## distribution.
     9 # deb-src http://pk.archive.ubuntu.com/ubuntu/ eoan-updates main restricted
    10
    11 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    12 ## team. Also, please note that software in universe WILL NOT receive any
    13 ## review or updates from the Ubuntu security team.
    14 # deb-src http://pk.archive.ubuntu.com/ubuntu/ eoan universe
    15 # deb-src http://pk.archive.ubuntu.com/ubuntu/ eoan-updates universe
    16
    17 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    18 ## team, and may not be under a free licence. Please satisfy yourself as to
    19 ## your rights to use the software. Also, please note that software in
    20 ## multiverse WILL NOT receive any review or updates from the Ubuntu
    21 ## security team.
    22 # deb-src http://pk.archive.ubuntu.com/ubuntu/ eoan multiverse
    23 # deb-src http://pk.archive.ubuntu.com/ubuntu/ eoan-updates multiverse
    24
    25 ## N.B. software from this repository may not have been tested as
    26 ## extensively as that contained in the main release, although it includes
    27 ## newer versions of some applications which may provide useful features.
    28 ## Also, please note that software in backports WILL NOT receive any review
    29 ## or updates from the Ubuntu security team.
    30 # deb-src http://pk.archive.ubuntu.com/ubuntu/ eoan-backports main restricted universe multiverse
    31
    32 ## Uncomment the following two lines to add software from Canonical's
    33 ## 'partner' repository.
    34 ## This software is not part of Ubuntu, but is offered by Canonical and the
    35 ## respective vendors as a service to Ubuntu users.
    36 deb http://archive.canonical.com/ubuntu eoan partner
    37 # deb-src http://archive.canonical.com/ubuntu eoan partner
    38
    39 # deb-src http://security.ubuntu.com/ubuntu eoan-security main restricted
    40 # deb-src http://security.ubuntu.com/ubuntu eoan-security universe
    41 # deb-src http://security.ubuntu.com/ubuntu eoan-security multiverse
    42
    43 # This system was installed using small removable media
    44 # (e.g. netinst, live or single CD). The matching "deb cdrom"
    45 # entries were disabled at the end of the installation process.
    46 # For information about how to configure apt package sources,
    47 # see the sources.list(5) manual.
    48 deb http://archive.ubuntu.com/ubuntu eoan main universe restricted multiverse
    49 deb-src http://archive.ubuntu.com/ubuntu eoan restricted universe main multiverse #Added by software-properties
saif@saif-Inspiron-3542:~$ \;
;: command not found
saif@saif-Inspiron-3542:~$
saif@saif-Inspiron-3542:~$ sudo dpkg --audit
dpkg: error: configuration error: /etc/dpkg/dpkg.cfg.d/multiarch:1: unknown option 'foreign-architecture'
saif@saif-Inspiron-3542:~$

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

If you change sources to something more local is it OK?

Revision history for this message
Manfred Hampl (m-hampl) said :
#2

What is the output of the commands

apt-cache policy dpkg
cat /etc/dpkg/dpkg.cfg.d/multiarch

Does this system have network access? Do you use a web proxy?

Revision history for this message
saif ullah (saifullah0391) said :
#3

saif@saif-Inspiron-3542:~$ apt-cache policy dpkg
dpkg:
  Installed: 1.19.7ubuntu2
  Candidate: 1.19.7ubuntu2
  Version table:
 *** 1.19.7ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu eoan/main amd64 Packages
        100 /var/lib/dpkg/status
saif@saif-Inspiron-3542:~$ cat /etc/dpkg/dpkg.cfg.d/multiarch
foreign-architecture i386
foreign-architecture i386

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

Do you use a proxy for Web access?

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

The contents of /etc/dpkg/dpkg.cfg.d/multiarch are not valid.

If you want to add i386 as foreign architecture for dpkg, then this is a wrong approach. Definition of i386 as additional architecture is dome with the command
sudo dpkg ..add.architecture i386
(and stored in /var/lib/dpk/arch)

I suggest that you delete the file /etc/dpkg/dpkg.cfg.d/multiarch

Futhermore your sources.list configuration file lacks eoan-updates and eoan-security (and eventually eoan-backports).

And again: A sever problem is the fact, that the update process could not reach the servers.
Please provide details about your way of connecting to the internet (cable or wireless, with or without web proxy, ...).

Revision history for this message
Launchpad Janitor (janitor) said :
#6

This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.