On Feb 23, 2020, at 16:07, Dave Horsfall wrote:

> I tried to install "factor" (required by some other package), and got the 
> following with "port upgrade outdated":
> 
>    --->  Cleaning factor
>    --->  Scanning binaries for linking errors
>    Warning: Error parsing file 
> /Applications/MacPorts/Factor-0.97/Factor.app/Contents/MacOS/factor: Error 
> opening or reading file
>    Warning: Error parsing file 
> /Applications/MacPorts/Factor-0.97/extra/macho/a.macho: Error opening or 
> reading file
>    Warning: Error parsing file 
> /Applications/MacPorts/Factor-0.97/extra/macho/a2.macho: Error opening or 
> reading file
>    Warning: Error parsing file /Applications/MacPorts/Python 2.7/Python 
> Launcher.app/Contents/MacOS/Python Launcher: Error opening or reading file
>    Warning: Error parsing file /Applications/MacPorts/Python 
> 3.4/IDLE.app/Contents/MacOS/Python: Error opening or reading file
>    Warning: Error parsing file /Applications/MacPorts/Python 3.4/Python 
> Launcher.app/Contents/MacOS/Python Launcher: Error opening or reading file
>    Warning: Error parsing file /Applications/MacPorts/Python 3.5/Python 
> Launcher.app/Contents/MacOS/Python Launcher: Error opening or reading file
>    Warning: Error parsing file /Applications/MacPorts/Python 3.7/Python 
> Launcher.app/Contents/MacOS/Python Launcher: Error opening or reading file
>    Warning: Error parsing file /Applications/MacPorts/Python 3.6/Python 
> Launcher.app/Contents/MacOS/Python Launcher: Error opening or reading file
>    Warning: Error parsing file 
> /Applications/MacPorts/Audacity.app/Contents/MacOS/Audacity: Error opening or 
> reading file
>    --->  Found 4 broken files, matching files to ports
>    --->  Found 2 broken ports, determining rebuild order
>    --->  Rebuilding in order
>        gq @1.2.3
>        ldapvi @1.7
> 
> (GQ fails to build for reasons which I have yet to address)
> 
> Is this something that I can easily fix?
> 
> Hmmm...  Late news before sending this to the list:
> 
>    Daves-MacBook-Pro:~ dave$ cd /Applications/MacPorts
>    Daves-MacBook-Pro:MacPorts dave$ ls
>    AquaTerm.app
>    Daves-MacBook-Pro:MacPorts dave$
> 
> Fascninating, as Mr Spock would say...  Looks like I have to reinstall
> MacPorts from scratch?  Yes, I installed AquaTerm a couple of days ago
> so "gnuplot" would work; looks like I somehow Trashed MacPorts.

MacPorts seems to be working, so I don't see any need to uninstall or reinstall 
MacPorts.

It sounds like some or all of the files that were supposed to have been 
installed by some of the ports you have installed are missing. I'm not sure how 
that situation arose. But the usual way to get back files that a port installed 
that have mysteriously vanished is to deactivate and reactivate the port. Since 
it sounds like you have multiple ports affected by this problem and don't know 
exactly which ones, you could deactivate all of your currently-active ports and 
then reactivate them.

To get a list of all the currently active ports and their versions and 
variants, you could run:

port -q installed active | sed 's/ (active)$//' > activeports.txt

To deactivate those ports, you could run:

xargs sudo port deactivate < activeports.txt

To reactivate those ports, you could run:

xargs sudo port activate < activeports.txt

You should then have all the same ports active as before, but any files that 
those ports were supposed to have installed that went missing should now be 
present again.

You can then delete activeports.txt.

Reply via email to