Does Trisquel come with GCC pre-installed?
- Login o registrati per inviare commenti
Recently I wrote a C code as part of a project.
when I tried to compile it using gcc command, from Trisquel 7.0 (Belenos), the bash gives this warning
bash: gcc: command not found
Does this means Trisquel don't have a GCC C compiler pre-installed with it?
Is there any workaround possible?
Why not install it or the build-essential package?
Use the Synaptic package manager to install the "gcc" package.
Thank you, Micha} and Magic Banana.
But when I type "gcc" in Synaptic package manager, I have the following packages marked as installed;
gcc-4.6-base (GNU base-package)
gcc-4.8-base (GNU base-package)
gcc-4.9-base (GNU base-package)
libgcc1 (GNU support library)
libgomp1 (GNU GOMP support library)
libquadmath0 (GNU quad-precision math library)
cpp-4.8 (GNU C preprocessor)
cpp (GNU C preprocessor (cpp))
This is a fresh install, and I have not added/removed any packages. Should I select gcc(GNU C compiler) package(shown in figure)?
A bit more explanation is appreciable.
There is a package that is simply named "gcc". The first one in your screenshot. It depends on the default version of the GNU compiler. But you can install another version if you wish. "gcc-4.9" for instance.
gcc-4.9 is not available in the repos, except for the Go compiler gccgo-4.9.
This is the simplest way to do it
1. open a terminal
2. type sudo apt-get install gcc
3. press enter
4. enter your password
5. press y and press enter
6. wait for it to install then Enjoy gcc!
Install build-essential. It depends on GCC so it'll drag GCC into being installed as well.
It drags the "dpkg-dev" package and its dependencies too. Only Debian developers want that.
It's not like installing it will break your system. The point of `build-essential` is to have a set of useful packages for developers or users that compile programs in general.
So, yes, `sudo apt install build-essential` will install GCC.
Of course it will not break the system. Anyway, you are wrong to believe that "build-essential" is aimed to "compile programs in general". Just read the first line of the package description:
If you do not plan to build Debian packages, you don't need this package.
@ Magic Banana: Should I select gnu, gnu-4.9(deselecting 4.6 and 4.8) along with other packages from the Synaptic Package Manager and press "Apply" to install GCC?
I read somewhere that GCC maintainers only hosts the source code, whereby individual free software distributions bakes their packages from its flavour. In that case, where can I get the GCC binary package for Trisquel? Does it also depends on processor architecture? (Mine's is i386.)
Thanks in advance for any suggestions.
I told you: just install the "gcc" package to get the default C compiler. If you plan to compile C++ code too, install the "g++" package to get the default C++ compiler. If you plan to build software through a Makefile, install the "make" package. It is easy. You do not need to download and install individual packages by hand! The Synaptic package manager makes the process much easier and safer (against man-in-the-middle attacks in particular).
/usr/bin/gcc is a symbolic link to the executable of which ever version of gcc you have installed.
If you wish to download the whole gcc package you can do so here (for Belenos on i386) http://packages.trisquel.info/belenos/i386/gcc/download
@lembas:
Thank you, dude. I will give it a try.
Once you get the package it can be installed with
sudo dpkg -i /path/to/package
or you can nstall gdebi and then double click a deb file and follow simple instructions on a gui..
Although learning some basic terminal won't hurt you
- Login o registrati per inviare commenti