Installing Boost port in MacPorts - xcode

I just installed MacPorts and am trying to install the boost port. When I type:
sudo port install boost
however, I get an error that says
Unable to open port: invalid command name "compiler.blacklist"
How can I fix this issue? When I try to do the installation in Pallet instead, nothing happens after choosing install and pressing "start."
Thank you for any help you can provide

You're running an outdated version of MacPorts. Run sudo port selfupdate. If that fails, you can try to get more information on the type of failure using sudo port -d selfupdate. If that doesn't help either you can just use the most recent installer from the MacPorts website to update your installation.

Related

Getting an error, Port gmake not found, while trying to setup for AOSP build environment

I'm following an instruction from https://source.android.com/setup/build/initializing to build the environment.
I'm at the section Installing the JDK where I have to install gmake, libsdl, git, and gnupg using MacPort.
POSIXLY_CORRECT=1 sudo port install gmake libsdl git gnupg
But I'm getting an error, Error: Port gmake not found.
I'm using macOS Sierra.
Any solution to this?
I assume you followed the installation instructions from:
https://www.macports.org/install.php
Note that you ought to have run sudo port -v selfupdate to update your local copy of the port tree.
Try the port diagnose command to see if it detects any of the more commonly encountered problems.

GraphicsMagick installation error on FreeBSD

When trying to install Graphicsmagick binaries to FreeBSD using
sudo pkg install GraphicsMagick
via SSH shell, I get this error message:
/usr/local/lib/libpkg.so.3: Undefined symbol "openat"
What is wrong?
You need to update FreeBSD. You're trying to use a port too current for the system you are running. You can either perform a binary upgrade, or you can update the source and build the kernel & world.

Using Macport on OSX 10.9

I installed macport following the guide.
http://afitnerd.com/2011/09/06/headless-browser-testing-on-mac/
However, when I try to run
sudo port upgrade
it has error message
Can't map the URL 'file://.' to a port description file ("Could not
find Portfile in /Users").
Please verify that the directory and portfile syntax are correct.
To use the current port, you must be in a port's directory.
How should I switch to the right directory?
sudo port upgrade tells MacPorts to upgrade the port defined by the Portfile in the current directory. It's usually a command only developers use while writing Portfiles. The guide likely meant sudo port upgrade outdated instead to upgrade all non-current ports. Since you don't have any ports installed if this is your first MacPorts installation, you can safely skip the command.
Note that firefox-x11 has meanwhile been removed from MacPorts because it was broken, outdated, and nobody stepped up to maintain it.

Setup Macports on an offline machine

I need to install dpkg for my mac and the easiest way I have seen for doing that is to install Macports. Unfortunately the machine I want to install it on is not connected to the internet.
Is there a way to download dpkg and its dependencies for macports and install the packages on the offline machine?
I have seen people mention to set it up on an online machine and move the whole macports folder, however the only machine I have online is running a different OSX version which could cause issues.
Thanks in advance.
You could try to download all sourcefiles using
sudo port fetch rdepof:dpkg
and then copy everything in (/opt/local/var/macports/distfiles/) to the offline machine and put it in the same folder there.
Then you should be able to build dpkg using
sudo port install -s dpkg
The -s option forces macports to build from source. (Prevent MacPorts from installing pre-built package?)

dyld: Library not loaded error when running command in terminal

When running some commands in the terminal, I get the following error message
dyld: Library not loaded: /opt/local/lib/libjpeg.62.dylib
Referenced from: /opt/local//lib/libTIFF.dylib
Reason: no suitable image found. Did find:
/opt/local//lib/libjpeg.62.dylib: can't map
/opt/local/lib/libjpeg.62.dylib: can't map
Trace/BPT trap
My xcode is up to date.
As your paths begin /opt/local I assume you are using macports
If so I think you need to at least do a sudo port selfupdate as the current tiff port depends on /libjpeg.7.dylib.
Possible a complete reinstall is needed if the macports was installed under Leopard or earlier
After you do your
sudo port selfupdate
don't forget to do a
sudo port upgrade outdated
to upgrade your existing ports. Much better than reinstalling everything :-)
On my Leopard machine using macports, libsdl_image was looking for this non-installed jpeg lib. The jpeg6b port includes it, but at a different path (/opt/local/lib/jpeg6b/lib/libjpeg.62.dylib). I fixed it by doing
port selfupdate
port install libsdl_image
which upgraded libsdl_image from 1.2.8_0 to 1.2.10_2 and made the problem go away.
I had the same problem. I have never runned anything else than Snow Leopard. I have tried all kind of stuff and used about 10 hours trying to fix this problem, but with no success.
I ended up removing macports completely and installed it again.
This is what I did:
First I got a list of all my installed ports:
> port installed
Then I uninstalled everything:
> sudo port -f uninstall installed
And installed macports again: macports and installed all my packages again.
It was rather tedious, but it did the trick.

Resources