0

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?

Raymond
  • 156
  • Did you copy it from the USB to your Ubuntu computer? Sometimes the USB will be mounted without permissions. – mchid Jan 16 '22 at 00:07
  • Yes I copied from USB to ubuntu. – Raymond Jan 16 '22 at 00:09
  • @Nmath I verified and it checks out. – mchid Jan 16 '22 at 00:10
  • @Nmath It's listed here – mchid Jan 16 '22 at 00:11
  • 1
    @Raymond Can you please copy and paste the error. – mchid Jan 16 '22 at 00:12
  • Thanks @mchid for clarifying I was just going to write same comment. – Raymond Jan 16 '22 at 00:12
  • @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 – Raymond Jan 16 '22 at 00:13
  • 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. 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 Jan 16 '22 at 00:20
  • 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. – mchid Jan 16 '22 at 00:27
  • I'll try this command, I've seen that post and many other posts. Have wasted full day on it. – Raymond Jan 16 '22 at 00:29
  • 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? – mchid Jan 16 '22 at 00:36

1 Answers1

0

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
  • 43,546
  • 8
  • 97
  • 150
  • Again, this method is not recommended but if you've tried everything else, you can use this workaround as a last resort option. – mchid Jan 16 '22 at 01:37