Search code examples
unixgccterminalsolaris

not able to install GCC on Solaris 11.4


I installed Solaris 11.4 x86 in VirtualBox. I need to install the GCC compiler so that I can run c code in Solaris. But each time I try to install the package this error occurs:

Errors were encountered while attempting to retrieve package or file data for the
requested operation. Details follow:
http protocol error: Unknown error code: 500 reason: Internal Server Error
URL: 'http://pkg.oracle.com/solaris/release/solaris/file/1/53eb07cd6fade116a6fdea7397c6839929ec0925'

publisher information:

enter image description here

I have used the following commands:

   sudo pkg install developer/gcc/gcc-c-7

also tried -nv option

sudo pkg install -nv gcc
sudo pkg install -nv gcc-7
sudo pkg install -nv developer/gcc-7

see the output of the following command:

kashif@OS:~$ pkg list | grep GCC

output:

system/library/gcc/gcc-c++-runtime                7.3.0-11.4.0.0.1.14.0      i--
system/library/gcc/gcc-c++-runtime-7              7.3.0-11.4.0.0.1.14.0      i--
system/library/gcc/gcc-c-runtime                  7.3.0-11.4.0.0.1.14.0      i--
system/library/gcc/gcc-c-runtime-7                7.3.0-11.4.0.0.1.14.0      i--

image below shows gcc package information from repostiry

enter image description here

I am trying to solve this problem for 2 days. I have read documentation from

https://docs.oracle.com/cd/E37838_01/html/E60979/publisher-config.html

I also tried to install developerstudio 12.6 but it didn't work.

overall picture of error and command:

image showing error

I have googled for errors tried to find information about errors and searched for how to install GCC on Oracle Solaris 11. I couldn't find any solution to this problem.


Solution

  • Try "wget http://pkg.oracle.com/solaris/release/p5i/0/developer%2Fgcc.p5i" or your preferred gcc package and manually install it with pkg install. You can try:

    pkg install -v

    after downloading.