简体   繁体   中英

qt could not find the platform plugin cocoa Mac M1

I keep getting this error while trying to run usdview on mac m1.

Regardless of usdview , there seems to be something wrong with qt that I have no idea what it is.

I am posting this after hours of googling and none of the solutions out there worked..

I tried installing cv2 , brew install qt5 , brew install qt6 , etc.

What is Qt platform plugin cocoa and why is it not being installed no matter what?

qt.core.plugin.loader: In /Users/username/miniforge3/plugins/platforms/libqwebgl.dylib:
  Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /Users/username/miniforge3/plugins/platforms/libqoffscreen.dylib:
  Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /Users/username/miniforge3/plugins/platforms/libqminimal.dylib:
  Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /Users/username/miniforge3/plugins/platforms/libqcocoa.dylib:
  Plugin uses incompatible Qt library (5.15.0) [release]
qt.qpa.plugin: Could not find the Qt platform plugin "cocoa" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

The platform plugin needs to be provided by the software vendor and is part of the application. It's not part of your local system. So you have to ask the vendor for a complete setup.

On Mac OS, you can actually look into the application and see, which platform plugins are provided: Right click the application in finder, select "Show package content" (I have to guess the name as my Mac speaks German, it will be the second menu entry from the top probably) - navigate into Contents/plugins/platforms. There should be a libqcocoa.dylib. If not, the setup is definitely incomplete.

And while you are already there: Under Contents/Frameworks should be the complete Qt stuff needed. Qt under /Users/username/miniforge3/plugins/platforms/ looks like the complete wrong place. Which is why you get errors like "Plugin uses incompatible Qt library".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM