Install packages without internet

For some reason, that doesn’t really matter at this point, my NetworkManager would not run. Every time I tried to start the service, it would fail. The error message was just something like “Error 1”. I decided that I would uninstall NetworkManager and then re-install it. So I did uninstall it. Then I tried to re-install it, and discovered that I can’t install a packages from the install DVD apparently. Since I don’t have NetworkManager, I can’t use online repositories, nor can I tether to another device for internet connectivity.

I downloaded the NetworkManager package, and I could install it, but I can install the dependencies. Is there a way to find the package dependencies, and their dependencies, and which packages provide those dependencies? Or, is there another way to install packages when I have no networking ability at all?

zypper lr -d
/sbin/lspci -nnk | grep -iA3 net

1 Like
zypper install some-package

will show the list of packages that have to be installed. For offline install it probably better to use

zypper install --no-recommends

to reduce the number of packages.

If systemd-network is installed, configure NIC in /etc/systemd/network/, disable NM, ensure you have usable /etc/resolv.conf, do systemctl enable systemd-networkd.socket and restart as required.

# systemctl list-unit-files *netw*
UNIT FILE                             STATE    PRESET
systemd-network-generator.service     disabled disabled
systemd-networkd-wait-online.service  disabled disabled
systemd-networkd-wait-online@.service disabled disabled
systemd-networkd.service              disabled disabled
systemd-networkd.socket               enabled  disabled                 static   -                    static   -                        static   -

8 unit files listed.
1 Like
ip link set up dev eth0
ip address add dev eth0
ip route add default via

And edit /etc/resolv.conf to add nameserver.

You may try and delete all configuration files of NetworkManager:

erlangen:~ # find /etc/NetworkManager/ -type f
erlangen:~ # rm -r /var/lib/NetworkManager/
erlangen:~ # 

Infamous host erlangen readily recovers and reconnects:

erlangen:~ # nmcli connection 
NAME                UUID                                  TYPE      DEVICE 
Wired connection 1  50aec290-a772-3efd-ba38-4074b80e9e93  ethernet  enp8s0 
lo                  03807f7b-cd67-4063-9c38-2e904210cb0e  loopback  lo     
erlangen:~ # 
1 Like

Is this a fresh install??

Or is this an install that has worked in the past, and suddenly does not work, network-wise?

It’s not a fresh install. After the install, the network was working fine for a months. One day it stopped working. I don’t remember if there was an update, or what? I had been trying to troubleshoot that, and I think I screwed something up that caused NetworkManager to stop working, but I don’t know for sure. I hadn’t been writing down what I was doing.

1 Like
pinball@localhost:~$ sudo zypper lr -d
#  | Alias                            | Name                                   | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                                           | Service
 1 |    | Main Repository (NON-OSS)              | Yes     | (r ) Yes  | Yes     |   99     | rpm-md |                         | 
 2 |        | Main Repository (DEBUG)                | Yes     | (r ) Yes  | Yes     |   99     | rpm-md |                       | 
 3 |      | Main Repository (Sources)              | Yes     | (r ) Yes  | Yes     |   99     | rpm-md |                      | 
 4 |      | Main Repository (OSS)                  | Yes     | (r ) Yes  | Yes     |   99     | rpm-md |                             | 
 5 | | Main Update Repository                 | Yes     | (r ) Yes  | Yes     |   99     | rpm-md |                               | 
 6 |           | Packman Essentials Repository          | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | | 
 7 |  | Packman Repository                     | Yes     | (r ) Yes  | Yes     |   99     | rpm-md |           | 
 8 |        | Packman Repository                     | Yes     | (r ) Yes  | Yes     |   99     | rpm-md |                | 
 9 | | libdvdcss repository                   | Yes     | (r ) Yes  | Yes     |   99     | rpm-md |                           | 
10 | openSUSE-20230621-0              | openSUSE-20230621-0                    | Yes     | (r ) Yes  | Yes     |   99     | rpm-md |                             | 
11 | repo-openh264                    | Open H.264 Codec (openSUSE Tumbleweed) | Yes     | (r ) Yes  | Yes     |   99     | rpm-md |                       | 
pinball@localhost:~$ /sbin/lspci -nnk | grep -ia3 net
	Subsystem: Device [174c:2104]
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
05:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 06)
	Subsystem: ASRock Incorporation Motherboard (one of many) [1849:8168]
	Kernel driver in use: r8169
	Kernel modules: r8169

This did not work. zypper wants a network connection to look the packages up.

No Wlan?

rpm -qa NetworkMan*
rpm -qa wick*

No, it does not. And if you are scared by failure to refresh repositories:

zypper --no-refresh ...

Thanks everybody for your help. I did get it installed. As I was working through the recommendations here, I had a thought, and tried something that worked. I want to make sure I relate that here so maybe it can help other people.

On a different computer, I navigated to the /oss repo for Tumbleweed. Then I downloaded the NetworkManager .rpm package. I won’t include the version because that will change over time. Anyway, I copied that to a USB stick and put that in the problem computer. I then double-clicked on that .rpm file which opened YaST. After I put in my password, it gave me a list of 5 packages that were missing. So I removed the USB stick and put it back in the other PC. From the repo page, I was able to download those packages from the /x86_64/ directory and the /noarch/ directory (3 were in one, 2 were in the other). I put those on the USB stick with the NetworkManager .rpm that I already had on there. I re-inserted that stick in the problem computer. At that point, I went into Software Repositories in YaST, Add, and added a new repository. I selected “Local Directory” and clicked Next. On that screen, I gave it a name (whatever you want), and browsed to the USB stick. In my case it was located in /run/media/-username-/-usb stick name-. Then, I went back and installed NetworkManager via YaST again. You could either double-click on the file, or just use YaST’s Software Management to do so. YaST - Software Management searched the USB stick as it was now a repository, installed all of the dependencies (because I put those packages on the USB stick earlier), and completed without issue. I then activated the NetworkManager service via YaST and rebooted. It just worked.

Thanks again to everybody for the help.

1 Like