0

I'm trying to install Sun/Oracle Studio on Solaris 11. We have a free developer account on the Sun Developer Network. I have the developer key and certificate. I scp'd them to the UltraSPARC workstation. I then ssh'd into the workstation (the workstation is headless).

According to How to Install a Certificate and Key for the Oracle Solaris Support Repository (this is step 2):

$ sudo pkg set-publisher -G '*' -M '*' \
  -g https://pkg.oracle.com/solaris/support/ \
  -c ~/pkg.oracle.com.certificate.pem \
  -k ~/pkg.oracle.com.key.pem  solaris
pkg set-publisher: Could not refresh the catalog for solaris

https protocol error: code: 401 reason: Unauthorized
URL: 'https://pkg.oracle.com/solaris/support/solaris/catalog/1/catalog.attrs'

And:

$ ls ~/pkg.*
/export/home/jwalton/pkg.oracle.com.certificate.pem
/export/home/jwalton/pkg.oracle.com.key.pem

Sun has a troubleshooting page at Cannot Access Publisher or Repository, but when I search for "pkg set-publisher: Could not refresh the catalog for solaris" there are no hits. (I must be the only guy on the planet getting that error).

I seem to be missing something or the docs are not quite correct.

How do I install the certificate and key so I can download Sun Studio?

  • 1
    Might be the only guy using this & Solaris for that matter....8-o – slm Jul 15 '18 at 22:54
  • 1
    @slm - Lol... Solaris is an acquired taste. I contribute to a few free projects and I bought the workstation for testing. Otherwise I would probably avoid Solaris. The one that befuddles me is the OOM kills. I have 8 GB of RAM and the damn machine runs out of memory with no load. – user56041 Jul 15 '18 at 23:03
  • I used it for the first 15+ yrs of my career so I'm familiar w/ it. It did it's job. – slm Jul 15 '18 at 23:15
  • What if you truss it? – slm Jul 15 '18 at 23:16
  • 1
    Thanks for your help @slm. We figured out it was the wrong repository. – user56041 Jul 16 '18 at 9:23
1

This command from How to Install a Certificate and Key for the Oracle Solaris Support Repository was incorrect:

$ sudo pkg set-publisher -G '*' -M '*' \
  -g https://pkg.oracle.com/solaris/support/ \
  -c ~/pkg.oracle.com.certificate.pem \
  -k ~/pkg.oracle.com.key.pem  solaris

Here is the correct command:

$ sudo pkg set-publisher \
  -G "*" -g https://pkg.oracle.com/solarisstudio/release \
  -k ~/pkg.oracle.com.key.pem \
  -c ~/pkg.oracle.com.certificate.pem solarisstudio
  • Bad docs, ugh, glad you figured it out. – slm Jul 16 '18 at 11:22
  • The command was correct for the Oracle Solaris OS support repository - you're using it with the Studio compilers release repository instead, so would need a different command. – alanc Jul 16 '18 at 14:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy