Score:3

How to get one package from Ubuntu distibution and manually install it without internet

pr flag

My Ubuntu 21.10 server has no internet. Unfortunately, main package to detect route issues and other network problem missing in distribution. Therefore I can don't know what real route has my server because route command is absent.

However, now I can see my server from other peer bridge. I want to copy net-tools from other machine by scp, than manually install this most important package. But:

  1. I mount Ubuntu LiveCD, add this source to /etc/apt/source.list - and receive answer "package not found"

enter image description here enter image description here

  1. How to locate package net-tools in http://archive.ubuntu.com/?
  2. What part need to copy to target machine by scp?
  3. How to start this package manually in target machine?
  4. How to avoid GPG problem and other issue with trusted installed package?
  5. I have similar problem with networking with various server in many years, in fact during all my carrier and in any Linux distribution. Why main package to detect network issues with tiny size developers don't included in any Linux distribution? What reason to delete so important package from LiveCD? I still don't understand this decision.
uz flag
Jos
On my system, `apt policy net-tools` gives that it is installed from `http://nl.archive.ubuntu.com/ubuntu impish/main amd64 Packages` . A bit of digging gives me that the actual link is `http://archive.ubuntu.com/ubuntu/pool/main/n/net-tools/net-tools_1.60+git20181103.0eebece-1ubuntu2_amd64.deb` for my Ubuntu version and architecture (AMD64). You would need to download that file and install it with `sudo dpkg -i filename.deb`.
guiverc avatar
cn flag
`route` is a *deprecated* command, the normal command to view routing details is `ip route` & has been for some time.
Alex avatar
pr flag
@guiverc, thank you. Yes, this is answer to part 3. Thank you.
Score:6
cn flag
raj

You can find download links for the package here: https://packages.ubuntu.com/impish/net-tools

I guess you want the 64-bit version so click on "amd64" link, this will get you to the page where you have to choose the server you want to download from (it is recommended to choose the one that is closest to you).

Copy it to the target system and install with:

sudo dpkg -i net-tools_*.deb
raj avatar
cn flag
raj
@N0rbert the question was about installing a package on a system that has **no** connection to the Internet; using `apt-get` instead of `dpkg` in tht case does nott seem reasonable.
N0rbert avatar
zw flag
The methodology is wrong. This package is simple, it does not have dependencies. Your great method will fail with any package with larger number of dependencies.
raj avatar
cn flag
raj
@N0rbert The whole question was about that particular package.
N0rbert avatar
zw flag
Then change packagename.deb to "that particular package".
Score:4
cn flag

For manual package downloading from an Ubuntu system:

sudo apt install package_name --download-only

For manual package downloading from another OS, use http://packages.ubuntu.com.

After copying the package across to the offline system, use apt to install it:

sudo apt install /path/to/package_name.deb

For most offline folks, that was the easy part, and this is where it gets tricky: Apt might refuse to install the package due to missing dependencies. That means writing down those dependencies and doing another round of manually downloading and scp-ing packages across.

sudo apt install /path/to/package1.deb /path/to/package2.deb /path/to/packageN.deb

Sometimes several rounds of dependencies. I once had to do eight rounds of sneakernetting before I got all the dependencies.

After that time, I learned my lesson. Now I keep an online VM with an identical package set as the offline system (no data) and use the apt --download-only method, which captures all dependencies the first time.

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.