Baisc commands in Solaris 10 not found

I just installed Solaris 10 on my virtual machine.

firstly I want to complie a c program using gcc but "the gcc is not found"

so I looked for a way and try to install the gcc and I tried the following command

pkg install gcc-45

but however, the "pkg is not found as well"

I also tried

pkgadd -d gcc-3.2.2-sol10-x86-local

and it gives me an error

 failed, errno = 2 pkgadd: ERROR: could not process datastream from <gcc-3.2.2-sol10-x86-local>

I did tried to install the pkgutil by the following command

http://pkgutil.wikidot.com/get-install-and-configure#toc3

but it's isn't of any help.

How then can I resolve "pkg not found" and install the gcc?

The pkg tool is not part of Solaris 10. A software repository is used only from Solaris 11 and later.

Start reading the very good documentation for Solaris 10, which can be found at docs.oracle.com.

Also, there is a version of gcc in Solaris 10 already. You can find it in /usr/sfw/bin .

1 Like

thanks