4

I'm a Linux newbie (but a long-time MacOSX user.) I have a two-part question, but it needs a little background first...

I built MacPorts from source. I ./configured it to install itself, all ports, and all port dependencies into ~/macports instead of /opt/local. This way I don't need to be root to run the port command, and everything I do (or wish I hadn't done) goes into my home directory instead of onto the system proper.

So, as a fan of MacPorts on my Mac, I have a two-part question:

1: What is the equivalent to MacPorts in the Linux world?

2: Can the Linux equivalent also be compiled from source so that I can run it non-privileged and also control where the ports and their dependencies get installed?

Thanks, -James

2
  • 5
    It would be very useful to those trying to answer your question if you indicated what linux distro you were using. Aug 17, 2009 at 3:28
  • Hi, Oops, sorry about that. The distro I'm (stuck with) using is SLES 10 (SuSE Linux Enterprise Server). Thanks. -James
    – James
    Aug 17, 2009 at 12:32

7 Answers 7

5

Most distros will come with their own package management system that will provide you with similar functionality. If you want something very similar to MacPorts though, I'd suggest you use Gentoo Linux which has portage.

4

Depends on the distribution

  • rpm extended by yum on redhat derived systems
  • dpkg extended by apt on debian derived systems but use aptitude
  • ...

the general term is "package manager" or "package management system"


In both of the cases listed above, the underling package manager (rpm and dpkg) provided basic package manipulations, and the next layer (yum and `apt) provide automatic dependency handling and some kind of conflict resolution.

2
  • 1
    Actually, dpkg is the equivalent of rpm, not apt.
    – wzzrd
    Aug 17, 2009 at 8:12
  • Um...yeah. And I knew that, but totaaly flaked on it when I was writing last night. Thanks. Aug 17, 2009 at 14:12
2

Depending of your distribution the package manager will or will not allow you to rebuild package from source and/or install binary in a custom directory.
You may take a look to www.pkgsrc.org it's netbsd port system and it can run on Linux (and even on mac is x!). It's very similar to macports (cd ; ./configure; make; make install).

2

GUI package managers

Command line package manager for SLES/OpenSUSE: Zypper

2
  • 1
    YaST has its own command line which has all the repository management stuff too - from memoery YaST --curses (possibly --ncurses). YaST is more than just package management though its your whole system management toolbox. Aug 18, 2009 at 6:00
  • These days, Debian also has PackageKit's "Packages for GNOME" (gpk-application)
    – rakslice
    Sep 27, 2015 at 6:45
1

To answer point 2 - Macports essentially provides a very nice wrapper around the manual build process [below] using its own config file to provide the values for ./configure values like --prefix, --libdir, --includedir. You be lucky and find that MacPorts "just work" on Linux. http://www.macports.org/install.php Similarly you may be able to get one of the *BSD's Ports systems to work on Linux as they, MacPorts and Gentoo Portage are all extremely similar tools [afiak all derive from one base product]

Failing that, you will likely end up needing to just build things manually from source yourself, this may be the easier option regardless. Its usually a pretty simple process:

download & unpack source
./configure --prefix=/my/preferred/app/base/
make && make install

As mentioned above Gentoo's Portage is extremely similar to Macports, but, it is the system package tool and as such won't [without significant customising of your environment] build to your own custom app home or as your preferred user. That said, there has been work done to have Portage work on other distro's and ironically the most prominent version of this work is Gentoo For OS X

You might be able to get system tools for your distro to work. Rpm at least [SLES package tools all ultimately run on top or RPM] has a --prefix option, though not all packages will allow you to install them anywhere other than their preferred location.

0

There is YUM for some distros,APT for others.. Go with Ubuntu Linux or Linux Mint. They use APT. It's a great distro with a great package manager.

0

You can try Brew. Other then silly installation issues ( where they tell you dont run it as root, it works perfectly and anyday better then most other installation managers outthere

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .