How to uninstall gcc so I can start over?
I am trying to upgrade to gcc5 on a rasperry pi. I tried the following:
Code:
sudo apt update Code:
michael@raspberrypi3:~/testclient/build $ cmake -DCMAKE_BUILD_TYPE=Release ../ && make Code:
michael@raspberrypi3:~ $ gcc --version |
Depends on what broke.
To me, it looks like cmake aborted. You might try the commands separately to see. You may need an update of cmake. |
When a distro puts a version together, they pay attention to trying to ensure that everything works together. The system components, of which gcc is one, are part of that intricate web.
So personally, and others may disagree with me, I would have been reticent in the first place to update only gcc and no other system components. If I wanted a more up-to-date version of gcc for a particular purpose, especially with a different major version number, then I would install a separate gcc version in addition to my current one (see http://gcc.gnu.org/faq.html#multiple), keeping the current one to handle everyday system compilations. However, even then, I would probably prefer to upgrade the entire system version to one more closely matched with the new gcc version. Uninstalling gcc? It will probably remove several packages with it. You might be better changing the sources list back and then forcing a downgrade. That might cause unintended complications however. Personally I would have made a system image before mucking around with gcc so that I could easily roll back to a previous image if things went awry. However, in saying all that, see http://unix.stackexchange.com/questi...ian-jessie-8-1 |
Try:
Code:
$ dpkg --purge --force-depends gcc Testing uses gcc6 which breaks a few things, like the kernel compile. |
Quote:
|
$ sudo apt-get install build-essential
Perhaps you're missing things, which is why it fails. The NOT best practices way, would be to change the /usr/bin/g?? links to some other version of gcc. $ ls -l /usr/bin/g?? $ ls -l /usr/bin/gcc-* $ sudo rm /usr/bin/gcc $ sudo ln -s /usr/bin/gcc-4.9 /usr/bin/gcc And such. The way you're supposed to do that is with the package management system. Or by overriding environment variables CC, CXX, ... ... ... But not all build configurations are portable enough to respect the environment vars. |
All times are GMT -5. The time now is 12:31 AM. |