How to completely remove Qt environment?
-
I compiled and installed Qt 4.8.3, then I installed the 5.0 beta from the downloaded DMG file. Now I find there are some errors when I try to compile an app. What should I do if I want to completely remove the Qt in my system? I want to uninstall all the 4.8.3 and 5.0beta, then try to reinstall the 5.0.
someone said I should use the:
@cd /Developer/Tools
./uninstall-qt.py @to do that. And someone suggest that I should use the:
@sudo Qt5.0.0beta1/MaintenanceTool.app/Contents/MacOS/MaintenanceTool
@but non of these ways can totally remove the Qt information remained. when I use:
@qmake -query@
there still have the paths from the old version which has been removed already.
-
If you've installed from the DMG files (and not compiled by hand) then you can use
"pkgutil":https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/pkgutil.1.htmlThis commandline tool enables you to see what the installer dropped on your harddisk and where. Currently at work I don't have a Mac to provide the exact syntax but it should be something like
@pkgutil --packages@
generates a list of all packages on your system. You could reduce the output with grep
@pkgutil --packages|grep qt@
or
@pkgutil --packages|grep troll@
To list all files installed with one of those packages enter
@pkgutil --files PACKAGENAME@
where PACKAGENAME is replaced with on of the names listed above.
After deleting all the directories and some single file you can tell OSX to forget about those packages (because OSX does not know that you have deleted the files manually):@pkgutil --forget PACKAGENAME@
-
Sorry, that was a typo, it's pkgutil. Fixed my answer.
And yes, it's an .app file but under the hood it installs some packages (at least on my systems ;-) ) -
[quote author="hardcodes.de" date="1349782950"]Sorry, that was a typo, it's pkgutil. Fixed my answer.
And yes, it's an .app file but under the hood it installs some packages (at least on my systems ;-) )[/quote]Thanks again :)
But when I tried to use that command, it doesn't show any Qt environment related path or package:
@192-168-1-14:~ yan$ pkgutil --packages|grep qt
com.autodesk.thirdparty.qt.4.7.2.2013.1.alpha6.4.7.2.x86_64.pkg
com.autodesk.thirdparty.qt.4.7.2.2013.1.pr16.4.7.2.x86_64.pkg
com.autodesk.thirdparty.qt.4.7.2.2013.1.pr18.4.7.2.x86_64.pkg@
Actually I installed 4.8.3(manual make&install) and 5.0Beta1(from DMG) -
You could try to "record a new installation":http://hints.macworld.com/article.php?story=20080707071246118
Don't know if that still works with current versions of OSX but it sounds sane.
-
[quote author="hardcodes.de" date="1349809214"]You could try to "record a new installation":http://hints.macworld.com/article.php?story=20080707071246118
Don't know if that still works with current versions of OSX but it sounds sane.[/quote]
I tried this app, and I feel it's not really useful for this case. All the changes it monitored is just about the Qt folder. There is nothing related to the /usr or /liburary.Maybe I need to reinstall the system :(
When I tried to use "qmake" compile the app, the error shows:
@Project WARNING: CONFIG+=qtestlib is deprecated. Use QT+=testlib instead.
Project ERROR: Unknown module(s) in QT: phonon
make: *** [Makefile.qmake.xcodeproj/project.pbxproj] Error 2
192-168-1-14:qmc2 yan$ qmake
Project WARNING: CONFIG+=qtestlib is deprecated. Use QT+=testlib instead.@ -
Hm...
I just installed the beta from DMG and everything goes into to the home directory. Trash it (and maybe empty trash) and it should be definitely gone.According to "http://qt-project.org/doc/qt-4.8/install-mac.html":http://qt-project.org/doc/qt-4.8/install-mac.html the self compiled library goes to /usr/local/Trolltech/Qt-x.x.x
But that could vary because of the version and Digia as new owner.
Update: "http://qt-project.org/doc/qt-5.0/install-mac.html":http://qt-project.org/doc/qt-5.0/install-mac.html states that it goes to /usr/local/Qt-%VERSION% directory.
If that does not help, isn't there something in the makefile hinting to the destination?What's in your PATH variable? Maybe you start accidentally the wrong qmake?
-
[quote author="hardcodes.de" date="1349898969"]Hm...
If that does not help, isn't there something in the makefile hinting to the destination?What's in your PATH variable? Maybe you start accidentally the wrong qmake?[/quote]
I feel a bit mad about the Qt environment now.
I just uninstalled the Qt 5.0 Beta1, then installed Beta2. But when I tried to compile, the error shows the qmake environment still points to Qt 5.0 Beta1 folder.
The error shows:
@Yans-MacBook-Pro:mamepgui yan$ qmake
Could not find mkspecs for your QMAKESPEC(default) after trying:
/Users/yan/Qt5.0.0beta1/Desktop/Qt/5.0.0-beta1/gcc_64/mkspecs
Error processing project file: /Users/yan/src/mamepgui/mamepgui.pro@ -
There is an uninstall uninstall-qt.py python script in /Developer/tools for Qt4.8.5
Running it you get something like:cd /Developer/tools
ls
Qt uninstall-qt.pysudo python uninstall-qt.py
Password:
removing package docs
removing package headers
removing package examples
removing package imports
removing package plugins
removing package tools
removing package libraries
.
.