Sun Studio 12 Update 1 Installation Guide

Fixing a Failed Installation or Uninstallation

On Solaris platforms, the installer stores information on which Sun Studio 12 Update 1 packages it has installed in two places:

On Linux platforms, the installer stores information on which Sun Studio 12 Update 1 packages it has installed in two places:

If some packages were not properly installed, you will have problems using the Sun Studio software, and you might have problems installing additional components or uninstalling the software.

For example, if the installer quit before installation was complete, the uninstaller (uninstall.sh) might not be present in your installation directory. Or if you used the pkgadd command to install any of the packages, the productregistry file or the product-cache directory in the /root/.nbi directory might be corrupted. In such cases, the uninstaller cannot uninstall the packages and you need to remove them in the correct way in order to be able to rerun the installer.

If the uninstaller quits before all the product files are deleted, rerunning the uninstaller will not delete the remaining files and you need to remove them in the correct way to complete the uninstallation of the product.

Do not uninstall the product by removing the installation directory. Packages will still be registered in the productregistry database and the /root/.nbi directory, and the installer will not run.

ProcedureUsing the Uninstallation Workaround Script to Fix a Failed Installation or Uninstallation

  1. Download the uninstallation workaround script tar file from the Sun Download Center into a directory of your choice.

  2. Unpack the file by typing:


    bzcat download_directory/sunstudio12u1_uninstaller.bash.tar.bz2 | /bin/tar -zf -
    
  3. If you are not currently superuser (root), become superuser by typing:


    su
    Password: root-password
    
  4. Start the script by typing:


    ./sunstudio12u1_uninstaller.bash
    

    If the Sun Studio software you want to uninstall was installed in an alternate root location, start the script with the -R option to specify the alternate root directory.

  5. The script analyzes your system and locates all complete or partial installations of Sun Studio 12 Update 1 software. For example, it might tell you that it has found the software in /opt/sunstudio12.1 because it finds package entries in the product registry even though you do not see a sunstudio12.1 directory in /opt.

  6. The script asks you to confirm that you want to install the software it has located. If the script has located one installation, type yes to indicate that you want it to remove that installation. If it has located multiple installations, type the pathname of the installation you want it to remove.

  7. The script executes pkgrm commands for all of the packages in the selected installation. It automatically interacts with pkgrm, answering yes when pkgrm asks for confirmation that a package should be removed, so do not type y when you see questions from pkgrm.

  8. The script informs you when all of the packages have been removed. Your Sun Studio 12 Update 1 software has been successfully uninstalled and you can reinstall it if you wish.

ProcedureManually Fixing a Failed Installation or Uninstallation on Solaris Platforms

  1. Become superuser by typing:


    su
    Password: root-password
    
  2. Open the Solaris Product Registry tool by typing:


    /usr/bin/prodreg &
    
  3. In the left pane of the tool, expand the Unclassified Software node.

  4. Select all of the package names containing Sun Studio 12 Update 1 and click Uninstall. Follow the instructions to remove the packages.

  5. Click Exit to exit the tool.

  6. Remove the /root/.nbi directory by typing:


    rm -r /.nbi
    
  7. If you installed the Sun Studio 12 Update 1 IDE component, remove the NetBeans IDE 6.5.1 by going to the installation directory (by default, /opt/sunstudio12.1) and typing:


    rm -r netbeans
    

ProcedureManually Fixing a Failed Installation or Uninstallation on Linux Platforms

  1. Become superuser by typing:


    su
    Password: root-password
    
  2. Find all of the Sun Studio packages by typing:


    rpm -q -a | grep sun
    
  3. Remove each Sun Studio 12 Update 1 rpm package by typing:


    rpm -e package-name
    

    Sun Studio 12 Update 1 rpm packages have the suffix 12.1–1, for example, sun-cpl-12.1–1. Be careful not to remove packages from other Sun Studio releases, which have different suffixes.

  4. Remove the /root/.nbi directory by typing:


    rm -r /.nbi
    
  5. If you installed the Sun Studio 12 Update 1 IDE component, remove the NetBeans IDE 6.5.1 by going to the installation directory (by default, /opt/sun/sunstudio12.1) and typing:


    rm -r netbeans