How do I install GNU/GCC compiler and related tools (such as make,
debugger, man pages) collection under Debian Linux system using command
line options?
You need to install following packages on Debian and Ubuntu Linux:
[a] build-essential package - Installs the following collection to compile c/c++ program on Debian/Ubuntu Linux:
OR
Sample outputs:
Sample outputs:
http://gengwg.blogspot.com/
You need to install following packages on Debian and Ubuntu Linux:
[a] build-essential package - Installs the following collection to compile c/c++ program on Debian/Ubuntu Linux:
Tutorial details | |
---|---|
Difficulty | Easy (rss) |
Root privileges | Yes |
Requirements | None |
Estimated completion time | 10m |
- libc6-dev - C standard library.
- gcc - C compiler.
- g++ - C++ compiler.
- make - GNU make utility to maintain groups of programs.
- dpkg-dev - Debian package development tools.
Installation
Open the Terminal and then type the following apt-get command as root user:# apt-get update && apt-get upgrade
# apt-get install build-essential
OR
$ sudo apt-get install build-essential
Sample outputs:
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: dpkg-dev fakeroot g++ g++-4.7 gcc gcc-4.7 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libc-dev-bin libc6-dev libdpkg-perl libfile-fcntllock-perl libitm1 libstdc++6-4.7-dev libtimedate-perl linux-libc-dev make manpages-dev Suggested packages: debian-keyring g++-multilib g++-4.7-multilib gcc-4.7-doc libstdc++6-4.7-dbg gcc-multilib autoconf automake1.9 libtool flex bison gdb gcc-doc gcc-4.7-multilib libmudflap0-4.7-dev gcc-4.7-locales libgcc1-dbg libgomp1-dbg libitm1-dbg libquadmath0-dbg libmudflap0-dbg libcloog-ppl0 libppl-c2 libppl7 binutils-gold glibc-doc libstdc++6-4.7-doc make-doc The following NEW packages will be installed: build-essential dpkg-dev fakeroot g++ g++-4.7 gcc gcc-4.7 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libc-dev-bin libc6-dev libdpkg-perl libfile-fcntllock-perl libitm1 libstdc++6-4.7-dev libtimedate-perl linux-libc-dev make manpages-dev 0 upgraded, 20 newly installed, 0 to remove and 0 not upgraded. Need to get 26.5 MB of archives. After this operation, 67.6 MB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://mirrors.kernel.org/debian/ stable/main libitm1 amd64 4.7.2-5 [36.6 kB] Get:2 http://mirrors.kernel.org/debian/ stable/main libc-dev-bin amd64 2.13-38 [224 kB] ..... .... .... Setting up manpages-dev (3.44-1) ... Setting up g++-4.7 (4.7.2-5) ... Setting up g++ (4:4.7.2-1) ... update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode Setting up build-essential (11.5) ... Setting up libstdc++6-4.7-dev (4.7.2-5) ...
Verify installation
You can verify gcc compiler and make tool using the following syntax:# whereis gcc make
# gcc -v
# make -v
Sample outputs:
gcc: /usr/bin/gcc /usr/lib/gcc /usr/bin/X11/gcc make: /usr/bin/make /usr/bin/X11/make /usr/share/man/man1/make.1.gz ... .. gcc version 4.7.2 (Debian 4.7.2-5) ... .. GNU Make 3.81 ..Now, you should able to compile software, create Debian packages or simply write a code using C / C++ compilers.
http://gengwg.blogspot.com/
Comments
Post a Comment
https://gengwg.blogspot.com/