Why does macports list multiple installed ports of the same version, and how do I fix it?
Specifically, the command:
sudo port list i开发者_C百科nstalled
Shows doubles of packages, like this:
apache2 @2.2.21 www/apache2
apache2 @2.2.21 www/apache2
...
ncurses @5.9 devel/ncurses
ncurses @5.9 devel/ncurses
php5-iconv @5.3.8 php/php5-iconv
php5-iconv @5.3.8 php/php5-iconv
php5-intl @5.3.8 php/php5-intl
php5-intl @5.3.8 php/php5-intl
...
Why is this?
How did it happen and how do I fix it?
From macports bug list
"port list installed" does not do what you think it does. "port list installed" gets the list of names of all the installed ports, and for each one, shows you the current version, regardless of what version is installed.
To see the versions that are installed, you want to use "port installed".
The inactive versions are older ports that have been replaced by newer ones that are active.
port list inactive
shows the ports that are not used any more and in your case should show one of each duplicate (or 2 or triplets etc)
port uninstall inactive
will remove the inactive ports and leave you with just one.
精彩评论