Apt-Get on CentOS in 5 Easy Steps

Sometimes YUM alone isn’t enough…. Luckily adding the ability to use the apt-get command in CentOS is pretty easy.  While I still encourage everyone who reads this to always use yum whenever possible…It’s nice to know that you have options when troubleshooting a difficult install process. There are a few variations on the best way to implement apt-get in CentOS – this is merely what has worked the best for me. 🙂

x

x

Installing Apt-Get on Centos

 

1.)  Check your System Architecture


2.)  Then download the appropriate .rpm File from below

 

CentOS 5

CentOS 6

 

3.)  Install RPMForge


4.)  Install apt


5.)  Then update your apt Repositories

x

x

Using Apt-Get

 

For apt-get Usage:


To Search for an Install

 

 

Additional Resources

https://help.ubuntu.com/community/AptGet/Howto
http://pkgs.repoforge.org/rpmforge-release/?C=D;O=D
http://wiki.centos.org/AdditionalResources/Repositories/RPMForge#head-5aabf02717d5b6b12d47edbc5811404998926a1b

 

  • cyril

    This post doen’st ok on CentOS 6.5
    => can’t install apt via yum install apt following the elements given here.
    How to install apt correctly?

    • Rionoskae

      I’ll have to verify the steps in 6.5, The above method was tested and working in 6.4….

      In the mean time, did you download the correct RPMforge for your architecture??

      • Rionoskae

        Also I would try installing epel yum repository:

        sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/$HOSTTYPE/epel-release-6-8.noarch.rpm

        I’m installing 6.5 now to test.

          Update:

        Just finished testing in 6.5 and can verify this does not work the same way in CentOS 6.5. I will see what I can do to get this working in 6.5…

        • Rionoskae

          The CentOS Repo listing discusses apt being available via the “Extras” Repo, but the link for it is dead. I’m assuming they are still working on certian aspects of the release… I think it should be available here once it is released.

          http://mirror.centos.org/centos/6/extras/x86_64/drpms/

          Let me know if you figure something else out!

          • WAS

            ANy update

    • loh

      i am trying to follow this(yum install apt) on Centos 6.5 also, not working trying so hard to find more info…

  • BrightTera

    This post doesn’t work on my CentOS 6.4

    I was stuck at Step 4. Could you please advise me how to solve it?

    [root@BrightTera ~]# yum install apt
    Loaded plugins: downloadonly, fastestmirror, refresh-packagekit, security
    Determining fastest mirrors
    epel/metalink | 5.2 kB 00:00
    * base: mirror.nus.edu.sg
    * epel: mirror.nus.edu.sg
    * extras: mirror.nus.edu.sg
    * rpmforge: mirror.oscc.org.my
    * updates: mirror.nus.edu.sg
    adobe-linux-i386 | 951 B 00:00
    adobe-linux-i386/primary | 1.2 kB 00:00
    adobe-linux-i386 2/2
    base | 3.7 kB 00:00
    base/primary_db | 4.4 MB 00:00
    epel | 4.4 kB 00:00
    epel/primary_db | 6.3 MB 00:01
    extras | 3.4 kB 00:00
    extras/primary_db | 19 kB 00:00
    rpmforge | 1.9 kB 00:00
    rpmforge/primary_db | 2.7 MB 00:11
    updates | 3.4 kB 00:00
    updates/primary_db | 4.7 MB 00:00
    xcat-2-core | 2.5 kB 00:00
    xcat-2-core/primary_db | 22 kB 00:00
    xcat-dep | 2.5 kB 00:00
    xcat-dep/primary_db | 24 kB 00:00
    Setting up Install Process
    No package apt available.
    Error: Nothing to do
    [root@BrightTera ~]# sudo apt-get update
    sudo: apt-get: command not found
    [root@BrightTera ~]# yum install apt
    Loaded plugins: downloadonly, fastestmirror, refresh-packagekit, security
    Loading mirror speeds from cached hostfile
    * base: mirror.nus.edu.sg
    * epel: mirror.nus.edu.sg
    * extras: mirror.nus.edu.sg
    * rpmforge: mirror.oscc.org.my
    * updates: mirror.nus.edu.sg
    Setting up Install Process
    No package apt available.
    Error: Nothing to do
    [root@BrightTera ~]#

  • BrightTera

    Fyi, at Step 3, I get the following warning:

    [root@BrightTera ~]# rpm -i rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
    warning: rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY
    [root@BrightTera ~]#

    • Cold Res

      That’s just a warning. Running rpm -ivh would probably give that it’s already installed. Try that.

  • Michael M

    error at:

    yum install apt

    getting:

    Error: Package: apt-0.5.15lorg3.94a-5.el5.rf.x86_64 (rpmforge)

    Requires: librpm-4.4.so()(64bit)

    Error: Package: apt-0.5.15lorg3.94a-5.el5.rf.x86_64 (rpmforge)

    Requires: librpmio-4.4.so()(64bit)

    Error: Package: apt-0.5.15lorg3.94a-5.el5.rf.x86_64 (rpmforge)

    Requires: librpmdb-4.4.so()(64bit)

    Mind you I’m on an Amazon Web Service instance

  • jewmonzi

    you shit didn’t work… step 4 No package apt available.

    • Always so great, when I get to read wonderful comments like these…

      Assuming from you’re terrible grammar, and lack of any information for me to help you troubleshoot – you obviously didn’t take the time to post here looking for an answer or to give feedback,…. But I’ll waste my time none the less…

      It DOES work on centos 6.4. / 6.5 has been confirmed as not working (yet). I really can’t make it any simpler than what is in the guide…. If it doesn’t work for you – try with a clean install and work backwards from there.

  • david knapp

    looks like links are dead.

    • Joshua Becker

      did you find any current source for the file?

Pin It on Pinterest