Linux: sudo: apt-get: command not found
This tutorial guides you on how to resolve linux error sudo: apt-get: command not found while running sudo apt-get commands in the terminal.
Linux: sudo apt-get: command not found
When I was trying sudo apt-get update command in the linux terminal, I got the following error message.
sudo: apt-get: command not found
And the same message I see whatever apt-get command that I try in the linux terminal.
The above problem you may be facing because of interrupted installation. The installation would have been corrupted due to power outage or bad drive or could be any other reason like incorrect file/folder permissions settings that you might have changed while you playground.
I would recommend you to do a fresh install of Linux OS again from a live CD or from USB.
Note, it is also possible that the apt-get package is missed in the installation. If you want to install apt-get package then follow the below section.
Installing apt-get
If the apt-get package is missed to get installed, its strange. Then you may need to install it manually by following the below steps.
1: First, search the apt version that you wanted to install from here: Download apt. For example, apt_2.0.5_amd64.deb.
2: Download the apt.deb version.
http://security.ubuntu.com/ubuntu/pool/main/a/apt/apt_2.0.5_amd64.deb
3: Finally, install the deb package.
sudo dpkg -i apt_2.0.5_amd64.deb
That’s all. Now you can start using sudo apt-get commands (sudo apt-get update) or install any other packages. And you should not see the error: sudo: apt-get: command not found any more.
Hope it helped 🙂
- Set or change root password in Ubuntu Linux
- How to Start Stop Restart MariaDB on Linux OS ?
- Putty Fatal Error No supported authentication methods available
- How to find which users belongs to a specific group in linux
- Give write permissions for specific user or group for specific folder in linux
- How to unzip a zip file from Terminal (Google Cloud Shell)
- Build a Docker Image with a Dockerfile and Cloud Build in GCP?
- How to create GCP project on Google Cloud Platform
- MariaDB – How to set max_connections permanently ?
- How to create GCP project on Google Cloud Platform
- Is it possible to change Google Cloud Platform Project ID ?
- Create non-root SSH user account and provide access to specific folders
- MySQL : How to grant all privileges to the user on database ?
- How to install OpenJDK 11 in Ubuntu Machine ?
- Amazon Linux AMI : apt-get command not found