Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does macports list multiple installed ports of the same version, and how do I fix it?

Tags:

macports

Specifically, the command:

sudo port list installed 

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?

like image 456
Ibmurai Avatar asked Sep 26 '11 19:09

Ibmurai


People also ask

What is the use of MacPorts?

Introduction. MacPorts is an easy to use system for compiling, installing, and managing open source software. MacPorts may be conceptually divided into two main parts: the infrastructure, known as MacPorts base, and the set of available ports.

Does MacPorts build from source?

If no archive is available, MacPorts will fall back to building from source. This can happen for a number of reasons: Each port is only prebuilt with its default set of variants. So if you specify different variants when installing, the port will be built from source.

How do I install MacPorts on High Sierra?

The easiest way to install MacPorts on a Mac is by downloading the pkg or dmg for Monterey, Big Sur, Catalina, Mojave, High Sierra, Sierra, El Capitan, Yosemite, Mavericks, Mountain Lion, Lion, Snow Leopard, Leopard or Tiger and running the system's Installer by double-clicking on the pkg contained therein, following ...


1 Answers

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.

like image 136
mmmmmm Avatar answered Sep 20 '22 07:09

mmmmmm