Installing GCC on OpenSolaris

*NEW* Click here for command line instructions, plus how to install gmake and subversion!

Are you using the new OpenSolaris, released May 2008?

If you have tried to ./configure any sources, you will find that you can’t, because the gcc isn’t in your PATH.
To get gcc on your PATH, do the following:

  • System > Administration > Package Manager
  • Search all packages for gcc
  • Install SUNWgcc
  • Once installed, open Terminal (right click on desktop)
  • Use: export PATH=$PATH:/usr/sfw/bin
  • Now everything should be fine!
This entry was posted in OpenSolaris and tagged , . Bookmark the permalink.

10 Responses to Installing GCC on OpenSolaris

  1. Muffins says:

    Indubitably.

  2. Mark says:

    Great directions, I appreciate it.

  3. Short and Sweet. These instructions worked for me too.

    Thanks.

  4. nkc says:

    i did the export..but when i run the configure script for installing gcc, i get the error no proper compiler found

  5. Ben says:

    Hi nkc,

    Did you use a different Terminal window to run configure than you used to export gcc? Or did you close the Terminal window which you used the export command in before using configure?

    The best thing to try is doing the following:
    echo “export PATH=$PATH:/usr/sfw/bin” >> ~/.bashrc

    This will add the export line to your .bashrc file and will be permanent across reboots and the closing of Terminal windows, etc :)

    HTH,
    Ben

  6. Pingback: Installing GCC on OpenSolaris « #!

  7. Hosam Al Ali says:

    Dear Mr please help me
    I don’t have Internet Connection on my OpenSOlaris Box

    How I can Download gcc on my Box and install it without
    internet or IPS

    please help

  8. $ pfexec pkg install gcc-dev

    or

    $ pfexec pkg install gcc-dev-4

  9. adios says:

    there is fault on the image, on disk )))).
    I ask question like “Hosam Al Ali”
    Where can i found GCC packege for openSolaris, if i don’t have internet connection on the machine, and how to install this package.
    and same question, about package ‘make’

  10. Ben Lavery says:

    There doesn’t appear to be a way of installing GCC without an Internet connection.
    If you can find a GCC for Solaris 10 which is in some sort of package, you *might* be able to install it like that.

    If you can find the package repository as a download (it was once available as an ISO) you can create you own local repo server (I recommend installing it in a zone). This way you can install anything from the repo without an internet connection.

    If all else fails you’ll need to carry your computer to the nearest internet point!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>