The officially official Devuan Forum!

You are not logged in.

#1 2024-12-02 11:32:44

SpongeBOB
Member
From: Brussels
Registered: 2022-02-07
Posts: 127  

Install packages / software to an offline machine...

Hi,

I would like to easily install some software/packages to an offline rpi devuan

I've heard of apt-offline that seem good for this purpose.
obviously it need to be installed to the offline machine.

so on the online machine I did

$ apt-cache depends apt-offline
apt-offline
  Depends: <python3:any>
    python3
  Depends: apt
  Depends: less
  Depends: python3-magic
  Recommends: debian-archive-keyring
  Recommends: python3-debianbts
  Recommends: python3-apt

then to get the .deb files,  and move them the offline machine.

$ apt-get download python3-magic apt-offline

once the deb file on the offline machine I did:

$ apt install /path/python3-magic_2%3a0.4.20-3_all.deb
success #I don't remember the ouput by heart :)

$ apt install /path/apt-offline_1.8.2-2_all.deb
#error, see here after

apt wanted to install automatically 9 other packages (iso-codes python-apt-common - python3-apt python3-debianbts etc... )
Of course as this machine is offline, it failed...

but why now, it want to dw other packages that are not listed with apt-cache depends ??????

Thanks.

Last edited by SpongeBOB (2024-12-03 14:07:08)


Linux noob, plz be kind big_smile

Offline

#2 2024-12-02 16:09:45

blackhole
Member
Registered: 2020-03-16
Posts: 108  

Re: Install packages / software to an offline machine...

You cannot use apt / apt-get / aptitude to install a deb file directly.

The One such tool for this is the package manager, dpkg.

To install offline, get the packages, including all of the dependencies along with the dependencies of the "recommends", if you feel you will need those as well (you most likely will), and put them all in one directory within your $HOME, cd to that directory, then:

# dpkg -i *deb

Last edited by blackhole (Yesterday 09:35:38)

Offline

#3 2024-12-02 17:26:01

greenjeans
Member
Registered: 2017-04-07
Posts: 593  
Website

Re: Install packages / software to an offline machine...

^^^^The above reply by blackhole is how I have always done offline installs of .deb packages myself. Just got to check that list of depends and make sure you got 'em all, if so, this is by far the fastest way to install.


https://sourceforge.net/projects/vuu-do/ New 1.09 isos uploaded 11/27/2024
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.
New Devuan-mate-mini isos too!
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Online

#4 2024-12-03 07:32:39

SpongeBOB
Member
From: Brussels
Registered: 2022-02-07
Posts: 127  

Re: Install packages / software to an offline machine...

Thank you blackhole & greenjeans

So that means I have to do an apt-cache depends ( and download the dependencies ) for each dependence of the desired program ? 😭


Linux noob, plz be kind big_smile

Offline

#5 2024-12-03 11:12:43

steve_v
Member
Registered: 2018-01-11
Posts: 387  

Re: Install packages / software to an offline machine...

blackhole wrote:

You cannot use apt / apt-get / aptitude to install a deb file directly.

AFAIK aptitude can't install from a file, but apt/apt-get has supported this for years. It'll even resolve dependencies for local packages (but not using local packages, at least not automatically, same as dpkg).

Last edited by steve_v (2024-12-03 11:16:53)


Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Offline

#6 2024-12-03 15:18:16

greenjeans
Member
Registered: 2017-04-07
Posts: 593  
Website

Re: Install packages / software to an offline machine...

So that means I have to do an apt-cache depends ( and download the dependencies ) for each dependence of the desired program ? 😭

That's what I do, but as Steve_V rightly said if you have an active connection apt can do it for you.

There is a way to have apt resolve depends using local packages, and that's if you have set up an offline repo of your own.

I did this years ago when gnome 2 was transitioning to gawdawful 3, I downed the entire repo including all gnome 2 packages and set myself up an offline repo in case I ever wanted more programs in the gnome 2 system I was using at the time.


https://sourceforge.net/projects/vuu-do/ New 1.09 isos uploaded 11/27/2024
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.
New Devuan-mate-mini isos too!
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Online

#7 Yesterday 09:32:21

blackhole
Member
Registered: 2020-03-16
Posts: 108  

Re: Install packages / software to an offline machine...

@steve_v, yes apparrently the local package install has been a feature since APT 1.1 (released in 2015). You have to specify the full path or it searches a remote repository.   I didn't know about that one - dpkg always worked for me though I suppose.

Offline

Board footer