1

I had a problem when trying to install/uninstall stuff on Ubuntu 20.04:

dpkg: error: error trying to open /var/lib/dpkg/info/format: Not a directory
E: Sub-process /usr/bin/dpkg returned an error code (2)

I saw this topic:

Lost/Deleted dpkg (package manager for Debian). How do I get it back?

But the website packages.ubuntu.com was down. Please tell me another website to download this dpkg.deb. I am using Ubuntu 20.04. Please tell me how to find the exact version to download. Thanks for all!

download dpkg package

Zanna
  • 72,312
Jackie
  • 13

2 Answers2

5

The site is not down; that link is invalid. See the list of supported releases for https://packages.ubuntu.com/

For all other use archive

Rinzwind
  • 309,379
0

An alternative way to download the source of a package is to use apt commands.

Just run the following commands to create a working directory and to download the .deb file:

mkdir DPKG
cd DPKG
apt download dpkg

To extract the files, run the following commands:

ar xvf *deb
tar xvf dat*

Now, to copy the files into place:

for i in [esuv]*; do sudo cp -R $i/* /$i/ ; done
mchid
  • 44,904
  • 8
  • 102
  • 162