LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-30-2014, 12:28 PM   #1
AlexBB
Member
 
Registered: Mar 2014
Posts: 444

Rep: Reputation: Disabled
Do I have gcc & gfortran installed?


Hi there. I have tried to install gcc and gfortran and it seems I succeeded although when I try to use search window I get negative results. Please, take a look at the image I posted. I used two commands: man gcc and gcc. When I typed gcc it gave me an error saying that no input file was provided which is true. The same happened when I typed gfortran.

Does it mean that I have both packages installed?

Thanks, - Alex
Attached Thumbnails
Click image for larger version

Name:	AAAA.png
Views:	21
Size:	91.7 KB
ID:	15095  

Last edited by AlexBB; 03-30-2014 at 12:31 PM.
 
Old 03-30-2014, 02:31 PM   #2
bcwagne
Member
 
Registered: Feb 2008
Distribution: Debian Testing, OSX
Posts: 164

Rep: Reputation: 32
From your screenshot, it looks like they are installed.

To be sure, type the following, which will tell you the version numbers of gcc and gfortran:

Code:
gcc -v
gfortran -v
If you get something that says a bunch of stuff that tells you the version, target, etc. you have them installed. If you get "command not found" they are not installed.

Good luck!
 
Old 03-30-2014, 04:14 PM   #3
AlexBB
Member
 
Registered: Mar 2014
Posts: 444

Original Poster
Rep: Reputation: Disabled
bcwagne, thank you. This is what I got when I typed the first line:

Quote:
gcc -v
You can see it in the snapshot. So much output came out. It surprised me. and the next thumbnail will be about gfortran. Thanks for the idea. So, do you think everything is OK? - Alex
Attached Thumbnails
Click image for larger version

Name:	AAAA.png
Views:	16
Size:	89.9 KB
ID:	15103   Click image for larger version

Name:	AAAAA.png
Views:	13
Size:	93.4 KB
ID:	15104  

Last edited by AlexBB; 03-30-2014 at 04:16 PM.
 
Old 03-30-2014, 07:00 PM   #4
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 620

Rep: Reputation: 142Reputation: 142
Hi Alex,

I don't know about gfortran but I installed gcc on my fedora box and used this to compile an existing c file. I would say you are on the right track

Code:
[tim@beiderbeck ~]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-isl=/builddir/build/BUILD/gcc-4.8.2-20131212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.2-20131212/obj-x86_64-redhat-linux/cloog-install --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.2 20131212 (Red Hat 4.8.2-7) (GCC) 
[tim@beiderbeck ~]$ ll /mnt/coding/
total 4096
-rwxrwxrwx. 1 506 506 4985 May 22  2013 selectserver.c
-rwxrwxrwx. 1 506 506 1028 May 21  2013 sizes.c
drwxr-xr-x. 2 502 502    0 May 17  2013 t2
-rwxrwxrwx. 1 506 506 2071 May 21  2013 universal.h
-rwxrwxrwx. 1 506 506 7745 May 22  2013 vitsim.c
[tim@beiderbeck ~]$ gcc /mnt/coding/selectserver.c -o /mnt/coding/selectserver.o
[tim@beiderbeck ~]$ ll /mnt/coding/
total 5120
-rwxrwxrwx. 1 506 506  4985 May 22  2013 selectserver.c
-rwxrwxrwx. 1 506 506 13640 Mar 31  2014 selectserver.o
-rwxrwxrwx. 1 506 506  1028 May 21  2013 sizes.c
drwxr-xr-x. 2 502 502     0 May 17  2013 t2
-rwxrwxrwx. 1 506 506  2071 May 21  2013 universal.h
-rwxrwxrwx. 1 506 506  7745 May 22  2013 vitsim.c
 
Old 03-30-2014, 07:07 PM   #5
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 620

Rep: Reputation: 142Reputation: 142
gfortran looks good as well. Unfortunately I don't have any fortran files kicking around to try with but this is the response I received.

Code:
[tim@beiderbeck ~]$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-isl=/builddir/build/BUILD/gcc-4.8.2-20131212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.2-20131212/obj-x86_64-redhat-linux/cloog-install --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.2 20131212 (Red Hat 4.8.2-7) (GCC) 
[tim@beiderbeck ~]$
 
Old 03-30-2014, 07:14 PM   #6
AlexBB
Member
 
Registered: Mar 2014
Posts: 444

Original Poster
Rep: Reputation: Disabled
Thank you timl.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
gcc and gfortran fereshteh Linux - General 22 07-29-2013 12:26 PM
run gcc gfortran Blink0 Slackware 9 04-19-2012 08:56 PM
problem in installing gcc-gfortran 4.3.3 Kilam orez Linux - Newbie 12 06-29-2011 01:20 AM
install gcc (already installed) erase gcc (not installed) huh ? kvenl Linux - Newbie 4 01-19-2011 02:24 PM
g77 in gcc 4.1.0 not found only gfortran fortran 95 compiler! I need fortran 77. TheBrick Linux - Software 3 07-04-2007 06:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration