Score:0

How can I install "apt" or "dpkg" on Ubuntu 20.04?

tt flag

I am renting a cloud server with Ubuntu 20.04. There is no GUI. I find that I need other utilities and the installation instructions I come across use either apt or dpkg. How can I acquire and install these?

Someone avatar
my flag
These are pre-installed!!!
tripleee avatar
nz flag
If they _aren't_ installed, your system is basically hosed. You'd need to be `root` and figure out how to correctly restore these utilities by manually copying them over from a working system. `dpkg` is designed so that you could basically bootstrap it from very basic utilities like `tar` etc, but you really have to know what you are doing.
tripleee avatar
nz flag
If your provider specifically disabled your ability to install anything, you would probably be violating their policy by attempting to circumvent this block; but this seems very unlikely to be a real-world scenario.
pa4080 avatar
cn flag
Hi, @bob72, how do you log-in and access the command-line of that cloud server? Are you using an SSH connection?
guiverc avatar
cn flag
Are you sure you're using Ubuntu 20.04 LTS given they are pre-installed.... Ubuntu Core 20 is based on 20.04, but does **not** have those commands installed; are you sure you're not using Ubuntu Core 20? (*it's a server product often used in devices, appliances or in the cloud!*)
Score:1
cn flag

These are core tools and they are installed by default with Ubuntu 20.04. Ubuntu is based on Debian and these are its core package maintenance tools:

  • dpkg - package manager for Debian - it is a tool to install, build, remove and manage Debian packages. The primary and more user-friendly front-end for dpkg is aptitude(1).
  • apt-get - package handling utility - it is the command-line tool for handling packages, and may be considered the user's "back-end" to other tools using the APT library. Several "front-end" interfaces exist, such as aptitude(8), synaptic(8) and wajig(1).
  • apt - provides a high-level commandline interface for the package management system. It is intended as an end user interface and enables some options better suited for interactive usage by default compared to more specialized APT tools like apt-get(8) and apt-cache(8).
  • snap - tool to interact with snaps. The snap command lets you install, configure, refresh and remove snaps. Snaps are packages that work across many different Linux distributions, enabling secure delivery and operation of the latest apps and utilities.
tt flag
All, Thank you for your answers. I just found out that I was assigned a server running CENTOS, not the Unbuntu server I asked for.
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.