Warning: cltversion:....

Ryan Schmidt ryandesign at macports.org
Wed Jun 2 20:13:10 UTC 2021

On Jun 2, 2021, at 05:21, Michael Newman wrote:

> This happens both on a 2017 iMac running Catalina and a 2010 MBA running High Sierra.

As far as I know, High Sierra and earlier are not affected by this problem. I believe it started happening in Mojave or Catalina and still affects Big Sur.

> Every time I run "sudo port upgrade outdated" I get the message about the command line tools:
> "Warning: cltversion: The Command Line Tools are installed, but MacPorts cannot determine the version."

Which ports are outdated? Perhaps a specific port is causing this message to appear for a different reason than the usual one.

> I follow the instructions here:
> https://trac.macports.org/wiki/ProblemHotlist#reinstall-clt
> This is the iMac:
> MrMuscle:volumes mnewman$ touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
> MrMuscle:volumes mnewman$ softwareupdate -l
> Software Update Tool
> Finding available software
> Software Update found the following new or updated software:
> * Label: Command Line Tools for Xcode-12.4
> 	Title: Command Line Tools for Xcode, Version: 12.4, Size: 440392K, Recommended: YES,

It's not clear from what you've written, but at this point, you would need to actually install/reinstall the command line tools, for example by using the System Preferences application to run Software Update. Then continue with the below.

> MrMuscle:volumes mnewman$ rm /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
> MrMuscle:volumes mnewman$ softwareupdate -l
> Software Update Tool
> Finding available software
> No new software available.
> MrMuscle:volumes mnewman$ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
> package-id: com.apple.pkg.CLTools_Executables
> version:
> volume: /
> location: /
> install-time: 1622628917
> groups: com.apple.FindSystemFiles.pkg-group

The fact that pkgutil finds the package suggests that everything is now as it should be.

> But it doesn't seem to "stick" and the next time it shows up again.
> What am I doing wrong?

It's not clear what you mean by "next time", but the nature of the Apple bug is that the receipt gets deleted at certain times which are unknown to us, which may include OS updates, Xcode updates, or other situations. Whenever this occurs, if you can verify using pkgutil that the CLT receipt is again missing, then you will need to repeat the above steps to put the receipt back in place again.

More information about the macports-users mailing list