DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi
I want to install and setup new version of GCC on my Debian,so for this work I must compile last version of GCC for install new version be completed
I do not know how can i do this?
Or,Is it true that for setup new version of GCC,I must compile last version?
please help me.
Sorry, but why not just install the package. You can use one of the two commands given below. The commands must be run as root or you can use sudo if you prefer.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Welcome to LQ.
# apt-get install g++
... to get a fully working gcc.
I.e. the packages { libc-dev, libc-dev-bin, linux-libc-dev, etc.}
that will make gcc work, will be installed as dependencies.
I want to install and setup new version of GCC on my Debian,so for this work I must compile last version of GCC for install new version be completed
It is more the opposite of what you said. In order to compile a newer version of GCC, you must first use the package manager in Debian to install some nearly current version of GCC.
Getting GCC source code and compiling it is a bit complicated for a Linux newbie. Are you sure it is something you want to do?
1) Check in your package manager, what is the newest GCC you can install via the package manager. Are you sure that isn't new enough?
2) Maybe you can find a newer GCC in a .deb file (meaning already compiled). That is harder than installing the one offered by the package manager, but easier than compiling.
3) GCC source code does come with pretty clear instructions for compiling it and for making the new one be a version-named alternative to the one installed by the package manager (so the two versions can co exist and you can select which one to use for any specific operation). You do need to be competent at command line Linux and you need to pat attention to details when reading those instructions.
# apt-get install g++
... to get a fully working gcc.
I.e. the packages { libc-dev, libc-dev-bin, linux-libc-dev, etc.}
that will make gcc work, will be installed as dependencies.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 5 .
As post #3 says, the one command # apt-get install g++
.. will take care that you get a fully working gcc.
Just try it, and you can watch the text that shows
all the other packages that will be installed.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.