Installing apt-get on redhat

TL;DR apt usually doesn't work out of the box with Enterprise Linux based distros and you won't find many repos that work for you anyway.

If you are having trouble finding the software you want on Red Hat, it is because your repositories don't have the packages. What you want to look into is adding different repositories. For Red Hat Enterprise Linux, the first repo to usually add is Extra Packages For Enterprise Linux (EPEL) hosted at The Fedora Project. You will likely find a LOT of what you are missing in that repo.

More information:

While it is certainly possible to install the apt package management utilities on an Enterprise Linux system, that does not mean you will be able to do anything with it once you are done.

The issue here is the apt utility is a program that works with published directories of software packages (repositories is the usual name for me, but it can vary). Yum, rpm, dnf, emerge, etc. are all utilities on varying *NIX distributions that do the same thing. But they don't offer the software themselves, they are configured to query the repositories and provide packages from them. The other issue is that the common repositories you find online are often created with configured to work with the native package management utilities for the OS they are offering software for. You could probably configure apt on your RHEL7 system to query the Debian repos, but the software likely would be incompatible with your system because of the differences in how Debian and Red Hat build, layout, structure, and configure their operating systems. It's like trying to install Mac OS X software on your Linux system. They are both technical *NIX based, but they vary widely in how they function.


You don't need to replace your package management tool just because a package seems to be missing.

Each package management tool is tightly integrated with its distribution, and this is no different with CentOS. apt is well integrated with Debian and its derivatives, and even if they (Debian, Ubuntu, Mint, Knoppix...) use the same tool for package management, their packages are linked and configured with specific package versions that in some cases will work only with specific dependencies that that distribution has.

What you need is to install the dev package of glib specific for redhat-alike OSs:

yum install glib2-devel.x86_64

The caveat here is that you will have to find an equivalent package, that can have a different name on your distribution. Knowing how to search packages on the distribution you are using is some well spent time on knowledge.

How did i found that this was the name:

[root@ftp ~]# yum search glib2| grep dev
glib2-devel.i686 : A library of handy utility functions
glib2-devel.x86_64 : A library of handy utility functions
spice-glib-devel.i686 : Development files to build Glib2 applications with
spice-glib-devel.x86_64 : Development files to build Glib2 applications with

And showing the package info, you can see that it seems to be the same library dev package:

[root@ftp ~]# yum info glib2-devel.x86_64
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.brisanet.com.br
 * extras: centos.brisanet.com.br
 * rpmforge-extras: apt.sw.be
 * updates: centos.brisanet.com.br
Available Packages
Name        : glib2-devel
Arch        : x86_64
Version     : 2.28.8
Release     : 9.el6
Size        : 300 k
Repo        : base
Summary     : A library of handy utility functions
URL         : http://www.gtk.org
License     : LGPLv2+
Description : The glib2-devel package includes the header files for the GLib library.

Also, if you are not familiar with package searching, this online tool can help you to find packages on most common Linux Distributions: Linux Packages Search


I am asking this question because I'm having some difficulty installing a plugin for pidgin (pidgin-sipe) because yum install libglib2.0-dev is failing, which is evidence to me that having apt-get might be a worthwhile investment.

Short answer: not really, no.

There's a port of apt for rpm, namely apt-rpm. It was usable until relatively recently, but as far as I know, Red Hat and its derivatives don't support it, so it may not be so now. Development seems to have stalled since 2008, which isn't promising. Also, apt-rpm cannot be used with yum repositories, so it's not useful unless someone has built rpm repositories that can be used with apt.

There was also a variant called apt4rpm created by Connectiva, but that seems to have been even less used than apt-rpm.

Installing Debian's own apt on a Red Hat system is a waste of time, even if it installs successfully. dpkg is available for Red Hat, or at least it used to be. But trying to set up a parallel Debian-like system using dpkg and apt would be a complete non-starter, I think.

I recall using apt-rpm on a Red Hat system around 2006 for basic system adminstration. If memory serves, it was a CentOS installation. It still worked quite well then. But this is 2017, and my guess would be that apt-rpm is now effectively dead.

In any case, I doubt using apt on a Red Hat system, even if it was available and functional, would make much difference to your experience. The reason why apt works well on Debian and its derivatives isn't because of any magical quality apt possesses. It's mostly because of Debian's famous quality control, though the Debian package management tools (dpkg, apt etc.) can take some of the credit for being well designed and implemented.

It you want the "apt experience", use Debian.

Tags:

Rhel

Apt

Pidgin