On Linux, there are very handy tools to install packages for the user. Mainly, there are:
- apt-get
- yum
(note: I’m going to go through this guide assuming you’re using yum on an Fedora/CentOS/Linux Operating System, but similar solutions exist for each.)
These will automatically search repos – which are repositories of packages, or programs, that the user may want to use – download, and then install the packages for the user. This means that instead of downloading the install package, locating it, double clicking on it (Windows Operating System (OS)), and then following the install instructions, you simply run a command such as: apt-get install python <- and it will download and install python for the user.
The Problem
However, some distrobutions of Linux don’t come with the most extensive repos enabled. My recent trouble was with Amazon Linux, but I’m sure you’ll have your own distro.
An indication that you need to add more repos to your OS would be when you go to install a package, following along the instructions from the package website, and you get an error saying no package exists.
BUT THE WEBSITE SAYS IT’S THIS EASY. I know. It’s frustrating.
The Solution
However, the solution is fairly straight forwards. You can probably search around for all sorts of crazy repos out there, which could also be a security hazard because you might get into downloading pretty sketchy versions of software from the outdated repo… but I suggest add the big Extra Packages for Enterprise Linux (EPEL) repository. Sounds scary, and it should be. There’s a lot of packages on there.
It is advised to take a look at your current repo list using:
yum repolist all
For me, this list was very short (I had two Amazon repos listed).
You can then add repos a few ways. But first, it might be smart to have a look and see if there are already repos that exist, and they are just disabled, using the command:
sudo vi /etc/yum.repos.d/epel.repo
tip: to see a list of repos available to Yum, just search the dir: sudo ls -la /etc/yum.repos.d/
If this file exists, you’ll see a few additional repos that you never knew you had! Look for a line that says enabled=0, and switch this to enabled=1. I would suggest picking the one that doesn’t have debug or source in it’s name, as those might have packages that are in beta modes (I don’t know really what the difference is, I’d love if somebody shared what the difference is in comments below).
Then if you try and install your package again and it still can’t find it to install, you might want to manually add the repo to your repo list using:
sudo yum-config-manager –add-repo https://www.example.com/repository.repo
Tip: repo files are succeeded with *.repo as the file format, that’s how you’ll know you have a repo.
Pingback: Installing Tor on Linux/UNIX/CentOS/Fedora/Amazon « Linux « Teition Solutions