uninstalling an old port after a new install

Ryan Schmidt ryandesign at macports.org
Mon May 5 20:29:04 PDT 2008


On May 5, 2008, at 07:39, Yvon Thoraval wrote:

> instead of doing :
> $ port upgrade -u mysql
> i did :
> $ port install mysql5 +server
>
> the latest becoming active (mysql5 @5.0.51a_0+server)
>
> then, i wanted to uninstall the oldest :
> $ sudo port uninstall mysql5 @5.0.37_0+darwin_8+server
> --->  Unable to uninstall mysql5 5.0.37_0+darwin_8+server, the  
> following ports depend on it:
> --->    php5
> Error: port uninstall failed: Please uninstall the ports that  
> depend on mysql5 first.
>
> does it means php5 uses the old version (mysql5 @5.0.37_0+darwin_8 
> +server) ?

No, php5 will use whatever version of mysql5 is active. The message  
should really say "Unable to uninstall mysql5 because the following  
ports depend on it" (in other words, it shouldn't really list a  
specific version, since ports don't (can't) depend on specific  
versions of other ports). It's just trying to warn you that something  
installed depends on mysql5, so you should not uninstall (all  
versions of) mysql5. Since you already have a newer version  
installed, there's no problem.

> or does it means i did it the wrong way ? (apart install instead of  
> upgrade)

No, the way you did it is fine.

> and i've to do "something" to get php5 working with the newest  
> mysql5 and uninstall mysql5 afterwards ???

All you have to do to uninstall the old mysql5 is to force the  
uninstall:

sudo port -f uninstall mysql5 @5.0.37_0+darwin_8+server




More information about the macports-users mailing list