problem installing ruby/readline

Caspar Florian Ebeling florian.ebeling at gmail.com
Sun Jun 22 07:05:38 PDT 2008


> I just installed macports and the first thing I wanted to install was
> the new version of ruby. I ran the install for ruby which installed
> several dependencies, when it got to readline I got the following
> message:
>
> --->  Activating readline 5.2.012_1
> Error: Target org.macports.activate returned: Image error: /opt/local/
> lib/libreadline.5.2.dylib already exists and does not belong to a
> registered port.  Unable to activate port readline.
> Error: The following dependencies failed to build: readline
> Error: Status 1 encountered during processing.

This is usually the case when a port is defective and does
not remove all its artefacts. Did you do previous installs
which you tried to remove entirely afterwards, or something
like that? Or interrupt an install procedure?

I always remove these forcefully with sudo rm, because the
file system /opt/local "belongs" to macports, so if it does not
know something there this is a bug/inconsistency. Or you
manually installed something under this PREFIX, which should
be avoided, of course.

You can manually check which port owns a file by:

  port provides PATH_TO_FILE

> Where it then ended the install. I tried running the install again and
> this time it seemed to install ruby without dependencies (since they
> were already installed), but it ended as:
>
> port activate ruby at 1.8.7-p22_2+thread_hooks
> Port command started with PID 28242
> --->  Activating ruby 1.8.7-p22_2+thread_hooks
> Error: port activate failed: Image error: ruby @1.8.7-
> p22_2+thread_hooks is already active.
>
> Curious if was properly installed I ran upgrade as follows:
>
> port upgrade ruby +thread_hooks
> Port command started with PID 28258
> --->  Activating readline 5.2.012_1
> Error: Activating readline 5.2.012_1 failed: Image error: /opt/local/
> lib/libreadline.5.2.dylib already exists and does not belong to a
> registered port.  Unable to activate port readline.
>
> Which revealed the original readline problem. I then tried to
> uninstall readline, but was stopped because ruby depends on it. I
> figured I could force-uninstall is and then reinstall it. So I force
> uninstalled it and then got this when trying to re-install:
>
> port install readline
> Port command started with PID 28316
> --->  Installing readline 5.2.012_1
> --->  Activating readline 5.2.012_1
> Error: Target org.macports.activate returned: Image error: /opt/local/
> lib/libreadline.5.2.dylib already exists and does not belong to a
> registered port.  Unable to activate port readline.
> Error: Status 1 encountered during processing.
>
> Any ideas here? I saw a similar problem in the archives from last
> year, but I didn't see a solution.
>
> Thanks,
>
> Philip
>
> p.s. I'm new to using ports, but I guess the ruby that is installed
> does not replace the ruby already on my system? I tried running ruby --
> version but saw the same version as before...

yes, the mp one lives at /opt/local (unless you changed PREFIX for mp),
and you can use whichever ruby you like by setting your PATH
variable appropriately.

Btw, usually it's a good idea to include infrmation about OS and
hardware when you report a problem to a mailing list.

Florian


-- 
Florian Ebeling
florian.ebeling at gmail.com


More information about the macports-users mailing list