3

While installing python3-dev on ubuntu 18.04.4 I am facing the following issue

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python3.6/libpython3.6-dev_3.6.9-1~18.04ubuntu1_amd64.deb  404  Not Found [IP: 43.255.166.254 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python3.6/python3.6-dev_3.6.9-1~18.04ubuntu1_amd64.deb  404  Not Found [IP: 43.255.166.254 80]

From my observations the packages python3.6-dev_3.6.9-1~18.04ubuntu1_amd64.deb, libpython3.6-dev_3.6.9-1~18.04ubuntu1_amd64.deb are not available instead python3.6-dev_3.6.9-1~18.04ubuntu1.1_amd64.deb, libpython3.6-dev_3.6.9-1~18.04ubuntu1.1_amd64.debare available. (note the difference between ubuntu1 and ubuntu1.1)

I tried downloading and installing the python3.6-dev_3.6.9-1~18.04ubuntu1.1_amd64.deb, libpython3.6-dev_3.6.9-1~18.04ubuntu1.1_amd64.debpackages manually but got the following error

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libpython3.6-dev : Depends: libpython3.6-stdlib (= 3.6.9-1~18.04ubuntu1.1) but 3.6.9-1~18.04ubuntu1 is to be installed
                    Depends: libpython3.6 (= 3.6.9-1~18.04ubuntu1.1) but 3.6.9-1~18.04ubuntu1 is to be installed
 python3-dev : Depends: libpython3-dev (= 3.6.7-1~18.04) but it is not going to be installed
               Depends: python3.6-dev (>= 3.6.7-1~) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).`

LOG

$ sudo apt-get install python3-dev/bionic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Selected version '3.6.7-1~18.04' (Ubuntu:18.04/bionic-updates [amd64]) for 'python3-dev'
Selected version '3.6.7-1~18.04' (Ubuntu:18.04/bionic-updates [amd64]) for 'libpython3-dev' because of 'python3-dev'
Selected version '3.6.9-1~18.04ubuntu1' (Ubuntu:18.04/bionic-updates, Ubuntu:18.04/bionic-security [amd64]) for 'python3.6-dev' because of 'python3-dev'
The following additional packages will be installed:
  libpython3-dev libpython3.6-dev python3.6-dev
The following NEW packages will be installed:
  libpython3-dev libpython3.6-dev python3-dev python3.6-dev
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 45.4 MB/45.4 MB of archives.
After this operation, 76.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Ign:1 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-dev amd64 3.6.9-1~18.04ubuntu1
Ign:2 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3.6-dev amd64 3.6.9-1~18.04ubuntu1
Err:1 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-dev amd64 3.6.9-1~18.04ubuntu1
  404  Not Found [IP: 43.255.166.254 80]
Err:2 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 python3.6-dev amd64 3.6.9-1~18.04ubuntu1
  404  Not Found [IP: 43.255.166.254 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python3.6/libpython3.6-dev_3.6.9-1~18.04ubuntu1_amd64.deb  404  Not Found [IP: 43.255.166.254 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python3.6/python3.6-dev_3.6.9-1~18.04ubuntu1_amd64.deb  404  Not Found [IP: 43.255.166.254 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

1 Answers1

2

Finally the issue was solved by removing the other architectures from dpkg

sudo apt-get remove --purge `dpkg --get-selections | awk '/arm64/{print $1}'`

sudo apt-get remove --purge dpkg --get-selections | awk '/armhf/{print $1}'

sudo dpkg --remove-architecture armhf

sudo dpkg --remove-architecture arm64