Score:0

apt-offline_1.8.2-1_all.deb "not a debian format archive" error

gs flag

My network is not working on Linux box. I downloaded apt-offline from https://packages.ubuntu.com/focal/all/apt-offline/download Copied it to ubuntu I've run checksum which seems to be fine.

$ shasum apt-offline_1.8.2-1_all.deb 
9584d3d68492b17c01994f9c9fe2775f979ddcba  apt-offline_1.8.2-1_all.deb

Ran this command

sudo dpkg -i apt-offline_1.8.2-1_all.deb

It gave error not a debian format archive

How to fix this issue or how to get correct apt-offline?

mchid avatar
bo flag
Did you copy it from the USB to your Ubuntu computer? Sometimes the USB will be mounted without permissions.
Raymond avatar
gs flag
Yes I copied from USB to ubuntu.
mchid avatar
bo flag
@Nmath I verified and it checks out.
mchid avatar
bo flag
@Nmath It's listed [here](https://packages.ubuntu.com/focal/all/apt-offline/download#pdownloadmeta)
mchid avatar
bo flag
@Raymond Can you please copy and paste the error.
Raymond avatar
gs flag
Thanks @mchid for clarifying I was just going to write same comment.
Raymond avatar
gs flag
@mchid how do I copy n paste all error from a PC which is offline? The error is something like - not a debian format archive
mchid avatar
bo flag
It's just that there might be something we're missing in the output besides the error alone. The output contains a few other things like in [this question](https://askubuntu.com/questions/896856/dpkg-deb-file-not-a-debian-format). Since the shasum is fine, it looks like we need a bit more info. As of now we don't know if the info would be helpful or not because we haven't seen it.
mchid avatar
bo flag
The other thing I would suggest would be to try using `apt` instead. It's worth a shot: `sudo apt install ./apt-offline_1.8.2-1_all.deb` Just don't forget the `./` or it won't work because you have to specify the path to the file.
Raymond avatar
gs flag
I'll try this command, I've seen that post and many other posts. Have wasted full day on it.
mchid avatar
bo flag
That or try downloading it again. It should have the wrong shasum if that's the problem but who knows? Maybe try a different method/browser to download the file?
Score:0
bo flag

If the shasum is good, I don't know why it's not installing. However, there is a dirty hack you can use to install the files manually. You will need to extract the deb package and then copy the files to your system. Unfortunately, dpkg and apt will not know the package is installed so eventually, you will have to fix this problem or manually install future updates.


First, create a working directory and move the deb file into the directory:

mkdir apt-offline
mv apt-offline_1.8.2-1_all.deb ./apt-offline
cd apt-offline

Then, extract the files using the dpkg-deb command like this:

dpkg-deb -xv apt-offline_1.8.2-1_all.deb

Alternatively, if dpkg-deb is not installed (command not found), you can use ar and tar to extract the files instead:

ar xvf apt-offline_1.8.2-1_all.deb
tar xvf dat*

After you extract the files, use the following command to copy the files into your system:

sudo cp -R ./usr/* /usr/

To verify the installation, run the following command:

which apt-offline

and it should return: /usr/bin/apt-offline


Aside from the fact that you won't get automatic updates, the other problem is that you won't have bash completion.

mchid avatar
bo flag
Again, this method is not recommended but if you've tried everything else, you can use this workaround as a last resort option.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.