= Problem Hotlist = == A port build fails on Snow Leopard with: "file is not of required architecture" == #wrongarch If you had MacPorts installed before upgrading to Snow Leopard, see [wiki:Migration]. == man port fails with error message == #manpath '''Error message:'''[[BR]] {{{ $ man port Cannot open the message catalog "man" for locale "de_DE.UTF-8" (NLSPATH="") No manual entry for port }}} '''Workaround:'''[[BR]] Add the following line to your .profile or .bash_profile. {{{ unset MANPATH }}} '''Ticket:''' #13444[[BR]] == port fails with: Image error: /opt/local/bin/a2p... == #perl5-image-error '''Error message:'''[[BR]] {{{ Error: Activating perl5 @5.12.3_1 failed: Image error: /opt/local/bin/a2p is being used by the active perl5.8 port. Please deactivate this port first, or use the -f flag to force the activation. }}} The perl5.8, perl5.10 and perl5.12 ports used to conflict with each other unless a particular variant was selected. This has now been solved by suffixing their binaries with a version number, and the perl5 port installs links without any suffix. The old versions of perl5.x conflict with the current version of perl5. '''Fix:'''[[BR]] To fix this issue, upgrade whichever of the above ports that you have installed. {{{ port upgrade installed and \( perl5.8 perl5.10 perl5.12 \) }}} == Fetch failures == #fetch-failures If fetch failed for a port, you can still get the distfile from anywhere else. For example, the [http://distfiles.macports.org/ main MacPorts distfiles mirror] contains most ports' distfiles, or maybe the homepage of the software lists alternative download locations for source tarballs. Just download the distfile and save it to the path shown by `port distfiles `. Make sure you get a file with exactly the same name (watch out for `.tar.gz` and `.tar.bz2`!) If a `port clean --all` has been done the distfile directory will have been removed. The directory for each port is created at the beginning of the fetch phase. '''Note:''' Checksum failures after a fetch are typically a separate issue. See the [wiki:FAQ#checksums FAQ]. == Image error: /opt/local/bin/xmlwf already exists and does not belong to a registered port == #xmlwf When installing a port with MacPorts, you encounter this error: {{{ Error: Target org.macports.activate returned: Image error: /opt/local/bin/xmlwf already exists and does not belong to a registered port. Unable to activate port expat. }}} xmlwf is a part of the expat port (which is a dependency of many other ports, and thus is likely to be one of the first ports to ever get installed), but for some reason this file already exists on your computer, and MacPorts did not install it. One reason for this is that you have installed a 3rd-party software package -- possibly [http://www.swi-prolog.org/ swi-prolog] -- which was itself built with MacPorts, set to its default prefix, and therefore conflicts with your normal use of MacPorts in its default prefix. The developers of the 3rd-party package you installed should not have distributed their software in this manner; they should have configured MacPorts in a custom prefix instead, one that is unique to their software. (For example, in the case of swi-prolog, /usr/local/swi-prolog or /opt/swi-prolog would be good choices.) Another reason is that you previously had MacPorts (and expat and probably other ports) installed, then somehow uninstalled MacPorts itself, or at least its registry of which ports are installed, without actually uninstalling those ports, and have now installed MacPorts again with a clean registry, which therefore thinks no ports are installed, though some still are. Either way, the cleanest solution for you at this point is to follow the [http://guide.macports.org/chunked/installing.macports.uninstalling.html MacPorts uninstallation instructions]. This will remove the 3rd-party software package that installed itself unannounced into MacPorts' prefix, and/or ports installed by your prior MacPorts installation. Then you can [http://guide.macports.org/chunked/installing.macports.html install MacPorts] again. == A command failed to run with a message referring to libpng12.0.dylib == #libpng '''Error message:'''[[BR]] {{{ dyld: Library not loaded: /opt/local/lib/libpng12.0.dylib }}} '''Explanation:'''[[BR]] When the libpng port was updated from 1.2.x to 1.4.x, the libpng library version changed. Software always links against a specific library version, so the ports you currently have installed that depend on libpng are linked against a now-nonexistent version of the libpng library. To fix this problem, all ports that depend on libpng will need to be rebuilt so that they link with the new version of the libpng library. This may be quite a few ports. '''Workaround:'''[[BR]] We have tried to find all affected ports and incremented the revision number. In most cases a simple upgrade should get them all fixed. {{{ sudo port selfupdate sudo port upgrade outdated }}} If this does not help, force a rebuild of the port in question by using the following command: {{{ sudo port -n upgrade --force $portname }}} You should also [http://guide.macports.org/#project.tickets file a ticket] against the port in question. == A port failed to build with a message referring to 1/lib: No such file or directory == #lib-spaces '''Error message:'''[[BR]] {{{ apple-darwin9-gcc-4.0.1: 1/lib: No such file or directory make: *** Error 1 }}} '''Explanation:'''[[BR]] When upgrading from Tiger to Leopard without removing the previous Mac OS version, updated versions of some libraries in {{{/usr/}}} and {{{/usr/lib/}}} are moved from {{{/old/path/}}} to {{{/old/path 1/}}}. Notice the space before {{{1}}}. This makes some {{{configure}}} scripts build bad build instructions, making the build phases of several ports fail. Two incriminated directories have been encountered : {{{ /usr/X11R6 1/ /usr/lib/ruby 1/ }}} '''Workaround:'''[[BR]] In order to fix this problem, you can remove the backups created by the installers, and then clean the work directory of the failed port so that its configure script will be re-run: {{{ port clean --work }}} == Corrupt Filemap == #corruptdatabase '''Error message:'''[[BR]] {{{ Error: unknown node kind in database (database is corrupted?) }}} '''Workaround:'''[[BR]] Probably something went wrong while a port was being (un)installed or (de)activated, such as a kernel panic or the machine losing power. You can fix the database file (`/opt/local/var/macports/receipts/file_map.db`) by downloading the following script: {{{ http://svn.macports.org/repository/macports/contrib/repairfilemap/repairfilemap.tcl }}} Follow the instructions in the comments at the beginning of the script. You can invoke the script by typing: {{{ chmod +x repairfilemap.tcl sudo ./repairfilemap.tcl }}}