Can apt-get be used on Red Hat systems?
Solution 1:
There is a project out there that claims to support apt
style repositories (as well as the apt-get
command) on RPM based distros. It is called apt-rpm and is used as the default package manager on a few distros, though not on RHEL/Fedora.
Problems:
- It seems not to be really maintained since ~2008; it may have incremental patches or fixes since then, but nothing major.
- Yum repositories are not compatible with
apt-rpm
, so even if you were to install it on your computer, you would need an apt-rpm repository to connect to in order to use it.
There is a fork of apt-rpm
that has been updated to be mostly compatible with rpm
version 5, which is used in all recent RPM distros. So if you insist on using it, a good starting point is to check out the Gitorious branch for apt-rpm for rpm5.
The command syntax of yum
is close enough to apt-get
that you should be able to learn one if you know the other within a day, or at most, a week. So unless there is some very strong business need for using apt
and you're willing to create your own apt-rpm repository (and deal with the cruftiness of software that's basically unmaintained), I would advise against proceeding down this train of thought.
Solution 2:
No, apt
is Debian specific. apt
uses dpkg
to install .deb
files (which are binary files that are specific to Debian).
Red Hat based Linux distributions uses the rpm
package management system. You can use yum
to retrieve and install rpms on Red Hat distributions:
yum search som-package-name
yum install some-package-name
If you want to install an rpm that you've downloaded on your own, you could use rpm -i some-package.rpm
to install it (and rpm -qa
to retrieve a list of all installed rpms). This is equivalent to dpkg -i some-package.deb
(and dpkg --get-selections
to retrieve a list of all installed deb packages) on Debian based distributions.