Macports: Unable to open port: Package Qt5Core was not found in the pkg-config search path

root's picture

Found this error when attempting to clean all packages:

eeny:~ osx$ sudo port clean all

[...]

Error: Unable to open port: Package Qt5Core was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5Core.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Qt5Core' found

Did a bit of search online and found this macports bug. It explains much more if curious but basically you have to install qt5-qtbase package:

eeny:~ osx$ sudo port -v install qt5-qtbase

[...]

--->  Cleaning qt5-qtbase
--->  Removing work directory for qt5-qtbase
--->  Updating database of binaries
--->  Scanning binaries for linking errors               
--->  No broken files found.                             
--->  Some of the ports you installed have notes:
  dbus has the following notes:
    ############################################################################
    # Startup items have been generated that will aid in
    # starting dbus with launchd. They are disabled
    # by default. Execute the following commands to start them,
    # and to cause them to launch at startup:
    #
    # sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
    # launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
    ############################################################################

Now the cleanup will be successful!

eeny:~ osx$ sudo port clean all
eeny:~ osx$

Thou shalt not steal!

If you want to use this information on your own website, please remember: by doing copy/paste entirely it is always stealing and you should be ashamed of yourself! Have at least the decency to create your own text and comments and run the commands on your own servers and provide your output, not what I did!

Or at least link back to this website.

Recent content