8/6/2023 0 Comments Homebrew vs macports 2017![]() When using Homebrew to install packages, one noticeable thing is that sometimes /opt/local may interference the build of the packages. When Using Homebrew to Install Packages … That’s why I try to use Homebrew if the package is available there. So now you see, although it’s not a big deal, Macports packages require more energy to set up. For example, assuming ~/bin is in your PATH environmental variable: echo 'exec use_macports.sh port $*' >~/bin/portĮxecuting the above line will give you a new “port” command which is actually a wrapper. pdflatex if texlive is installed from MacPorts) directly without the lengthy command above, you can wrap frequently used commands into scripts. įor example, you need to run port command to install texlive: use_macports.sh port install texliveįor convenience, if you want to run port (or any other executables installed from MacPorts, e.g. Then, to wrap any executables installed by Macports, just run: use_macports.sh executable args1 args2. # Wrap Macports command (any executables installed by Macports).Įcho "Usage: $0 command " >&2Įxport PATH="$MACPORTS_PREFIX/bin:$MACPORTS_PREFIX/sbin:$PATH"Įxport CPATH="$MACPORTS_PREFIX/include:$CPATH"Ĭopy this script to any directory in your PATH environmental variable. To do this, I wrote a wrapper script use_macports.sh: #!/bin/bash where $MACPORTS_PREFIX is the installation prefix of Macports (by default it is /opt/local. Wrap Macports Executables with Appropriate Environmental Variables When You Use themīefore running any executables, we need to prepend $MACPORTS_PREFIX/bin:$MACPORTS_PREFIX/sbin to the PATH environmental variable, etc. But remember not to modify environmental variables related to Macports, such as PATH, CPATH. It is not garanteed to work, and it is possible that it does not work under some certain circumstances.įollowing the installation instructions on their websites ( Homebrew and Macports) to install both of them. Please note that this post only presents a workaround. We will wrap the executables installed by Macports with suitable Environmental Variables. When one package is not available in Homebrew, install it from Macports (you will soon see why). The basic rules here are using Homebrew packages as much as possible. Although having both of them installed is not recommended, I still want to give it a try. But sometimes, there are just some packages not available in Homebrew while they are in Macports. At most of the time, Homebrew is fair enough: it has a large package collections. The error is not due to the packages intermixed with each other.Homebrew and Macports are two excellent package managers on OS X. To quadruple check before submitting any bug reports to make sure that ![]() Unless you know very well what you are doing.īut most important: in case you do end up with two systems, make sure With two systems it's easy to run into problems Look for files inside MacPorts prefix, but that's not as frequent).Īs a general rule of thumb having just one manager is a lotīetter/easier/safer. ![]() MacPorts (even though some badly written configure scripts may still Similarly, when you install Homebrew packages, hide the prefix to Relatively bad idea to have Homebrew inside /usr/local, but of course The trace mode) is the best recipe for running into numerous problems Having Hombrew under /usr/local and then using MacPorts (esp. Ideally hide the path to Homebrew while installing new ports with MacPorts, then the most important piece of advice is NOT to install but if you really really want to have Homebrow installed alongside It can cause you problems that we don't want to spend time investigating, because they wouldn't be problems if you hadn't also used a second package manager. > best practice for running macports along with homebrew On 29 August 2017 at 23:24, Ryan Schmidt wrote: Next message: running macports along with homebrew. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |