What is the Linux equivalent of MacPorts?
Solution 1:
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.
Solution 2:
Depends on the distribution
-
rpm
extended byyum
on redhat derived systems -
dpkg
extended byapt
on debian derived systems but useaptitude
- ...
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.
Solution 3:
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).
Solution 4:
GUI package managers
- YaST - SLES/OpenSUSE
- Synaptic - Ubuntu/Debian
- gnome-app-install - Ubuntu ("add/remove")
- PackageKit - Fedora
Command line package manager for SLES/OpenSUSE: Zypper
Solution 5:
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.