/usr/local/bin/lynx: Bad CPU type in executable

Michael Newman mgnewman at mac.com
Sun Dec 22 10:13:47 UTC 2019

More of the story.

When I got up this morning I found that a couple of scripts that I run overnight had failed with error 127. It seems that the scripts couldn’t find curl. So I checked, and sure enough, curl was missing. No worries, I can reinstall it.

And then I wonder, what else is missing? I try: 

  port list installed 

and find that there are only two ports: lynx which I installed yesterday and curl which I had just installed.

What happened? Well, just before installing lynx I did a selfupdate and upgrade. At the end of the upgrade I was invited to do a reclaim. So, I did. Now, admittedly, reclaim presented me with a huge long list of stuff it was going to remove.  Whenever I look at all the ports on my machine I only recognize a handful; most are things I know nothing about and never requested, they’re just stuff that the ports I want depend on. Fair enough. 

However, it would be nice if reclaim warned you that it was working with an empty or near empty requested file.

I’m sure that as part of the Catalina migration I did:

  sudo port unsetrequested installed
  xargs sudo port setrequested < requested.txt

Either I forgot, or it didn’t work. In any event, apparently every installed port was removed.

Fortunately, I still had the myports.txt file, so I was able to use:

  sudo ./restore_ports.tcl myports.txt

And get everything back.

I find it a little scary that a few simple mistakes can cause such havoc.

Mike Newman
Korat, Thailand

More information about the macports-users mailing list