I needed to do a Kubuntu 20.04 install to my new PC for something I'm working on. However my ethernet and wifi both require some packages not available on the install ISO. So I had a shiny new 20.04 install with no internet. I had the driver files for my ethernet card but it requires the "build-essential" package to rum "make" and "make-install." Build-essential is a meta-packages that pulls 45 packages with it and I had no idea which packages I would need. This method is very helpful in many cases like this one because you don't have to figure out which packages you need - apt does it for you.
Since my 22.04 is on-line I knew I could get the packages I needed but which packages and how do I get them for 20.04 from a 22.04 install?
Whatever packages you're situation might be needing, here's a method to easily capture the needed packages and get your system on line.
If the system you're using is the same distro and release that you need packages for, it's even easier.
Here's my method:
You need:
If you need packages for a different distro/release that the system you are using, start with Step 1.
If you are using the same distro/release that you need packages for, skip steps 1 and 2.
1. On a system that has internet access, create a virtual machine of the distro you need to get packages for.
Any VM system you're comfortable with should work and long as you can get on-line from the VM and access a USB drive.
In my case, I made a VM of Kubuntu 20.04 using QEMU/KVM but I have no doubt VirtualBox would have worked just as well.
2. Boot the VM and get on-line on the VM.
Do steps 3, 4, and 5 on the VM.
3. Open a terminal and run "sudo apt clean".
This clears unneeded packages that might be left over from the initial install.
4, Run "sudo apt install -y --download-only <YOUR PACKAGE(S)>".
This downloads all the packages and dependencies but does not install them.
In my case, the "build-essential" package is actually 45 packages.
The packages are now in the /var/cache/apt folder.
5. Copy the .deb files from /var/cache/apt/ to your USB drive.
6. Boot the computer or distro you need to install the packages to and mount the USB drive.
7. Open a terminal and navigate to the USB mount folder.
8. Run "sudo dpkg -i *.deb" in the folder.
You now have installed the needed packages.
In some cases, you may have to install some packages in a specific order to satisfy dependencies.
If you get dependency errors, install each package one at a time until all the packages are installed.
In my case, all 45 packages installed easily and without error.
After doing this, I was able to run the ethernet driver installer and my Kubuntu 20.04 install was on-line.
Since my 22.04 is on-line I knew I could get the packages I needed but which packages and how do I get them for 20.04 from a 22.04 install?
Whatever packages you're situation might be needing, here's a method to easily capture the needed packages and get your system on line.
If the system you're using is the same distro and release that you need packages for, it's even easier.
Here's my method:
You need:
- A bootable computer with internet access.
- If it's a different distro or release from the system you need packages for; the ability to create a virtual machine on that computer.
- A USB drive.
If you need packages for a different distro/release that the system you are using, start with Step 1.
If you are using the same distro/release that you need packages for, skip steps 1 and 2.
1. On a system that has internet access, create a virtual machine of the distro you need to get packages for.
Any VM system you're comfortable with should work and long as you can get on-line from the VM and access a USB drive.
In my case, I made a VM of Kubuntu 20.04 using QEMU/KVM but I have no doubt VirtualBox would have worked just as well.
2. Boot the VM and get on-line on the VM.
Do steps 3, 4, and 5 on the VM.
3. Open a terminal and run "sudo apt clean".
This clears unneeded packages that might be left over from the initial install.
4, Run "sudo apt install -y --download-only <YOUR PACKAGE(S)>".
This downloads all the packages and dependencies but does not install them.
In my case, the "build-essential" package is actually 45 packages.
The packages are now in the /var/cache/apt folder.
5. Copy the .deb files from /var/cache/apt/ to your USB drive.
6. Boot the computer or distro you need to install the packages to and mount the USB drive.
7. Open a terminal and navigate to the USB mount folder.
8. Run "sudo dpkg -i *.deb" in the folder.
You now have installed the needed packages.
In some cases, you may have to install some packages in a specific order to satisfy dependencies.
If you get dependency errors, install each package one at a time until all the packages are installed.
In my case, all 45 packages installed easily and without error.
After doing this, I was able to run the ethernet driver installer and my Kubuntu 20.04 install was on-line.
Comment