difficulty updating libiconv

Ryan Schmidt ryandesign at macports.org
Tue Apr 23 21:37:03 PDT 2013


On Apr 23, 2013, at 21:40, David Winsemius wrote:

> Running MacOS 10.6.8 on an early 2008 MacPro. In the process of attempting to work with GNU-Octave for Andrew Ng's Coursera Machine Learning course, I am getting errors when attempting to access the help facility. The errors say my libiconv is out of date and need to be updated to version 8.0.0.
> 
> octave-3.4.0:1> help eye
> dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib
> Referenced from: /opt/local/bin/makeinfo
> Reason: Incompatible library version: makeinfo requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0

https://trac.macports.org/wiki/ProblemHotlist#libiconv-version


> I originally tried downloading copies of libiconv and replacing them in /opt/local/lib/ but that did not seem to be effective.

You really shouldn't do that. Allow MacPorts to be in control of the files that are installed in /opt/local. If you've done that, you need to undo it, for example by forcibly deactivating and then re-activating MacPorts libiconv:

sudo port -f deactivate libiconv
sudo port activate libiconv


> --->  Activating python27 @2.7.3_1
> Error: org.macports.activate for port python27 returned: Image error: /Applications/MacPorts/Python 2.7/Build Applet.app/Contents/Info.plist already exists and does not belong to a registered port.  Unable to activate port python27. Use 'port -f activate python27' to force the activation.
> Error: Failed to install python27

Why does this file already exist if it was not provided by MacPorts? How did it get there?


> The original command was:  sudo port upgrade --force libiconv
> 
> Which has generated an impressively long list of items that MacPorts thinks needs to be upgraded and is erroring out on occasion.

This will forcibly upgrade libiconv *and all its dependencies*, possibly multiple times; this is probably not what you want. Assuming there are no outdated ports, to rebuild libiconv only, if that is what you want to do, be sure to use the -n flag to not follow dependencies:

sudo port -n upgrade --force libiconv


> (The last two such errors I decided to go ahead and issue the suggested activate command, but I am wondering whether this is safe now.) So should I keep on executing suggestions like: 
> 
>   sudo port -f activate python27

We do not necessarily suggest running that command; the MacPorts message is poorly worded. MacPorts is just saying that if you know what you are doing, you can run that command to forcibly install the files anyway, overwriting the files that are already there. You don't necessarily want to do that; you should first explain why those files already existed.

One reason might be if you ran a third-party software installer that was itself built with MacPorts which overwrote some of your existing MacPorts files (with ones of a different architecture or version, perhaps) and added other files. A situation like this and some common culprits is discussed here:

https://trac.macports.org/wiki/ProblemHotlist#xmlwf

If that's what happened, then explain to whoever distributed that software that they should not have distributed it in that manner due to the problems it causes for users actually using MacPorts.


> I also run R (and if I had to choose between Octave remaining "helpless" versus difficulties with R I would abandon Octave in a millisecond). The R binaries are provided by Simon Urbanek at ATT who I think believes thinks MacPorts is evil and generally advises to avoid MacPorts or Homebrew.  I do have some stuff in /opt/local/ including tcl, tk, ImageMagick and sqlite binaries, but no copies of libiconv appear to reside there. I have read that one should "move that directory aside" but I have not yet seen an explicit command showing those of us with little brain how to accomplish this "movement".

When you wrote /opt/local, did you mean /usr/local? If so, please get rid of it. Having software installed in /usr/local will interfere with MacPorts.

The explicit command to move /usr/local aside could be:

sudo mv /usr/local /usr/local-off

And to move it back, if you insist on doing so:

sudo mv /usr/local-off /usr/local

We instead recommend you install any software you need using MacPorts. tcl, tk, ImageMagick and sqlite3 are all available and well-maintained in MacPorts.




More information about the macports-users mailing list