3

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.
Alex
  • 205
  • 1
    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. – Jos Jan 09 '22 at 22:26
  • 1
    route is a deprecated command, the normal command to view routing details is ip route & has been for some time. – guiverc Jan 09 '22 at 22:28
  • @guiverc, thank you. Yes, this is answer to part 3. Thank you. – Alex Jan 09 '22 at 22:29

2 Answers2

6

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
N0rbert
  • 99,918
raj
  • 10,353
  • @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. – raj Jan 10 '22 at 12:31
  • 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. – N0rbert Jan 10 '22 at 14:42
  • @N0rbert The whole question was about that particular package. – raj Jan 10 '22 at 14:48
  • Then change packagename.deb to "that particular package". – N0rbert Jan 10 '22 at 14:49
4

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.

user535733
  • 62,253