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
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....
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 ?
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.
Under Solaris, the command is "pkgadd " with various options.
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.
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.
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)