I am using ubuntu 9.10 and it comes with gcc 4.4. How can I install gcc 4.5 without screwing up my gcc 4.4. environment. I just need gcc 4.5 to compile 1 application.
Thank you.
The first step then is to install Homebrew on Ubuntu 20.04 / Debian 10 after that we can continue without any problems. The next step is to simply run the brew command to install GCC, the latest version of which is 11.1. Then the whole download and installation process will start.
To switch between gcc versions, I used the following: Show activity on this post. You need to use the equals sign instead of the colon. You'll also need to update your default gcc config. How to change the default GCC compiler in Ubuntu?
To check that GCC is installed, you can display the version. In case you already have GCC installed globally, then you can go to the folder where the binary is and run gcc-11 (Homebrew GCC 11.1.0_1) 11.1.0 Copyright (C) 2021 Free Software Foundation, Inc.
It is an open source toolset for compiling source codes of C, C++, Objective-C, Fortran, Ada, Go and D programming languages. In this article, I am going to show you how to install GCC on Ubuntu and compile C and C++ programs.
My preferred method is to have a deb-src
entry in /etc/apt/sources.list
as e.g.
# Debian sources
deb-src http://ftp.us.debian.org/debian/ unstable main contrib non-free
I can then do apt-get source foo
and fetch the appropriate package with its sources which will be unpackages. I typically add a local changelog entry (set apart by a revision number as 1.2-3local0) and rebuild. This sometimes entails building dependencies. It all depends...
I guess gcc-4.5 is currently in experimental as per this page so you would have to add experimental to the sources.list
file as well. I have not used this but it should work too:
deb-src http://ftp.debian.org/debian experimental main
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With