简体   繁体   中英

I installed GCC 5.2 from source and I don't know how to uninstall it on Ubuntu 15.04

The other week I installed GCC 5.2 from source on my ubuntu machine. I wanted to be able to use fully supported cilk features. Now I would like to revert back to GCC 4.9. How can I uninstall GCC 5.2? I tried using make uninstall but as I understand this is not supported.

I believe you don't need to revert to the system compiler; it is a matter of path. Or set up your $PATH appropriately. Use /usr/bin/g++ for the system compiler, and probably /usr/local/bin/g++ for the compiler you have built from source code from GCC

BTW, you probably could use your GCC 5.2 for almost all your future builds

It depends how you have configured it.
You should have configured it with ../gcc-5.2/configure --program-suffix=-my-5.2 then you would use g++-my-5.2 instead of g++

Try to type g++ -v (ie probably /usr/local/bin/g++ -v ) to understand how it was configured.

You probably could remove the gcc and g++ binaries under /usr/local/bin/ and several other files and directories under /usr/local/ (but be careful).

Indeed, GCC does not support make uninstall

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