Installing gcc - recieve error message gcc : cannot execute


 
Thread Tools Search this Thread
Operating Systems Solaris Installing gcc - recieve error message gcc : cannot execute
# 1  
Old 08-07-2008
Installing gcc - recieve error message gcc : cannot execute

AIM- Install Oracle 11g on Solaris using VMWare

Steps

1.Logged on as root
2.Created subfolders à /usr/local/bin & /usr/local/bin/gcc
3.Downloaded gcc & libiconv & unzipped them on my harddrive & burnt them on CD
4.Copied files from CD to /usr/local/bin/gcc
5.Terminal (root) à pkgadd -d /usr/local/bin/gcc /libiconv à successful
6.Terminal (root) à pkgadd -d /usr/local/bin/gcc /gcc à successful
7.pkginfo - i gcc à not seen
8.pkginfo - i SMCgcc à see's it.
9.gcc -version à does not see /usr/local/bin or /usr/local/bin/gcc

but modify

10.
path of install..I add /etc/.profile
PATH=$PATH:/usr/local/bin:/usr/ccs/bin/:/usr/local/bin/gcc; export PATH
Save and restart
11.
echo $PATH --> appears
12.
gcc - version --> gcc : cannot execute

What have I missed ?
Any assistance greatly appreciated....
# 2  
Old 08-07-2008
If you create a directory named /usr/local/bin/gcc, you'll have a hard time running a command being /usr/local/bin/gcc too.

What Solaris version is this ?
# 3  
Old 08-07-2008
Installing gcc - recieve error message gcc : cannot execute

Explain please - your statement (new Solaris)

Solaris 10
# 4  
Old 08-07-2008
Quote:
Originally Posted by Ackers
Explain please - your statement (new Solaris)
You cannot execute a directory. Your steps 2 and 4 are broken.
Quote:
Solaris 10
If you are using Solaris 10, there is no need to install gcc given the fact it is already bundled with the OS.
Just use "/usr/sfw/bin/gcc".
# 5  
Old 08-08-2008
Installing gcc - recieve error message gcc : cannot execute

Appreciate your comments.

q1
So, do I need to add "/usr/sfw/bin/gcc" to
path of install..I add /etc/.profile
PATH=$PATH:/usr/local/bin:/usr/ccs/bin/:/usr/sfw/bin/gcc; export PATH ?

So, when I try "gcc - version " will output correctly?

q2
In general, how do you install package correctly ? say if gcc (any package) was not installed. Where would you install it ? Would you not create folder, unzip it and then run package from there ?

Thanks again.
# 6  
Old 08-08-2008
Quote:
Originally Posted by Ackers
So, do I need to add "/usr/sfw/bin/gcc" to
path of install..I add /etc/.profile
PATH=$PATH:/usr/local/bin:/usr/ccs/bin/:/usr/sfw/bin/gcc; export PATH ?

So, when I try "gcc - version " will output correctly?
No, you need to put /usr/sfw/bin (without /gcc) in your PATH.
The PATH variable is a list of directories where the shell looks for executables. /usr/sfw/bin/gcc is an executable, not a directory.
Quote:
In general, how do you install package correctly ?
Under Solaris, the command is "pkgadd " with various options.
Quote:
say if gcc (any package) was not installed. Where would you install it ?
Don't confuse the temporary location where you download the package file and the location where the package files are deployed. The former is some temporary directory your can safely remove after the operation while the latter is (usually) hard-coded by the package creator.
Quote:
Would you not create folder, unzip it and then run package from there ?
No, and that is the problem you had. Don't create any target directory. The pkgadd command will do it for you. And don't create temporary directories in locations that belong to the OS, like /usr.
Use /tmp, /var/tmp, your home directory or top level non standard directories (eg: /software) for your temporary files.
# 7  
Old 08-08-2008
Installing gcc - recieve error message gcc : cannot execute

Greatly appreciated for comments.

Gives me better understanding of packages now. (come from Windows environment)

Last 2 questions

q1
Does this mean, I need to uninstall gcc package I installed ?
Use gcc that is supplied from o/s.

q2
gcc is part of o/s in solaris 10 - "statement"
If I run the command, "pkginfo -i gcc" why does it say package not found ?
But, if I run command "pkginfo -i SMCgcc" see's it. (the one I installed)

Can you explain please ???
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Trouble installing Arachne - possible gcc error? Maybe?

Hi, I am having trouble installing Arachne from the broad institute. I'm using ubuntu through Oracle's VirtualBox. When I use the ./configure command, I do not get any obvious errors. However, the make command always fails. Here is my output for the .configure command and for the make... (3 Replies)
Discussion started by: kblanch
3 Replies

2. Solaris

GCC installing

dear, please just didn't understand the problem that appears when i try to install ./configure here is the message that appears in unix when installing gcc root@ccbtest # ./configure checking build system type... /bin/bash: ./config.guess: No such file or directory configure: error: cannot... (3 Replies)
Discussion started by: semaan
3 Replies

3. Solaris

Installing gcc on SPARC 5.9

Hi, I am trying to install gcc on SPARC 5.9 pkgadd -d gcc-3.4.2-sol9-sparc-local i get the below error pkgadd: ERROR: attempt to process datastream failed - open of <gcc-3.4.2-sol9-sparc-local> failed, errno=2 pkgadd: ERROR: could not process datastream from... (3 Replies)
Discussion started by: saharookiedba
3 Replies

4. SCO

SCO 5.0.7 Installing gcc 3.4.3 cause error in make

Did anyone get gcc updated on sco 5.0.7 ? Here is what I did installed Openserver Development System installed Openserver Linker and Application Development Libraries This gave me older gcc compiler 2.95.3 which is required to compile the latest gcc 3.4.3 Configuration went ok but issued... (1 Reply)
Discussion started by: miles556
1 Replies

5. Solaris

Error when installing GCC

GCC 3.4.6 was installed in Solaris 2.8. I ran the commands ./configure and make. When running make install I got the below mentioned errors at the end. Please help me in resolving the same. make: *** Error 1 make: Leaving directory `/gmsp/antony/gcc-3.4.6/sparc-sun-solaris2.8/sparcv9/libf2c'... (1 Reply)
Discussion started by: chrisanto_2000
1 Replies

6. Solaris

error while installing gcc

Hi friends, i down loaded the gcc*.gz file and i am getting the following error when i am trying to install it on solaris 8 ======================================================= Processing package instance <SMCgcc342> from </export/gcc-3.4.2-sol8-sparc-local> gcc (sparc) 3.4.2 FSF... (1 Reply)
Discussion started by: sveera
1 Replies

7. Programming

Installing gcc

Hi all I'm trying to install the latest version of gcc but I keep getting this message on make; gcc -DHAVE_CONFIG_H -I. -I. -I. -I. -I. -I./../zlib -I./../include -W -Wall -pedantic -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -g -O2 -c jartool.c jartool.c:234: getopt.h: No... (3 Replies)
Discussion started by: squeakywheel
3 Replies

8. Programming

installing gcc-3.1 on Irix 6.5.15

I am trying to install gcc-3.1 in an SGI Indigo2 running Irix 6.5.15. When I try to configure gcc-3.1 I keep getting the following message: Created "Makefile in gcc/ using "mh-frag" cc ERROR: cannot exec /usr/lib32/cmplrs/fec *** The command 'cc -o conftest -g conftest.c' failed *** You... (0 Replies)
Discussion started by: mdbanas
0 Replies

9. UNIX for Dummies Questions & Answers

Problem installing gcc

Hi! I have downloaded a precompiled gcc package but I'm having problems installing it. It is supposed to install in /usr/local and there is plenty of space left there but during the installation I get the following error message “No space left on device”. Is it some kind of temp folder that is out... (2 Replies)
Discussion started by: alfabetman
2 Replies

10. Programming

Help!(Installing GCC.)

(Installing GCC: Configuration) In the document of Installing GCC, there is a sentence I don't understand: " Second, when configuring a native system, either cc or gcc must be in your path or you must set CC in your environment before running configure. Otherwise the configuration scripts... (2 Replies)
Discussion started by: wwz
2 Replies
Login or Register to Ask a Question