LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Unistall Java before installing newer version (http://www.linuxquestions.org/questions/slackware-14/unistall-java-before-installing-newer-version-4175454451/)

Sandlin 03-17-2013 05:15 PM

Unistall Java before installing newer version
 
I have Java currently disabled on Slackware 13.37 and would like to install the newer version. But, first I need to uninstall the old version and can't find an explanation of how to do that. Would someone please explain clearly now to uninstall the old version?

hemp4fuel 03-17-2013 05:47 PM

How was it installed? A slackware package? If so 'removepkg name-of-package', for example 'removepkg jre'.

gabytf 03-17-2013 06:37 PM

or "pkgtool", select "Remove", then check/select the java you want to uninstall.

Richard Cranium 03-17-2013 07:20 PM

Or use upgradepkg.

Sandlin 03-17-2013 07:29 PM

How installed?
 
Quote:

Originally Posted by hemp4fuel (Post 4913511)
How was it installed? A slackware package? If so 'removepkg name-of-package', for example 'removepkg jre'.

Hemp4fuel,
This was installed when I installed Slackware 13.37 from the installation disc. Then, it was disabled because it was such a mess, had so many security flaws. I just downloaded jre-7u17-linux-i586.tar.gz from the Java website. It tells me how to install it and says that first you must uninstall the current version, but only gives instructions for removing an RPM package but no other package. So, it was installed with the OS, so I don't know how it was installed.
If I use removepkg, which one do I remove? Is it
/usr/lib/mozilla/plugins/libnpjp.so, or /usr/lib/java/plugin/, or both?

allend 03-17-2013 08:37 PM

This is the procedure for installing java from your download. http://docs.slackware.com/howtos:software:java

chrisretusn 03-17-2013 09:41 PM

How did you disable it? Just in the browser perhaps?

Code:

java -version
Will give you version information, unless it is already removed.

If it was installed when you installed Slackware 13.37 then:
Code:

removepkg jre
should remove it. If that returns
Code:

ls: cannot access /var/log/packages/jre*: No such file or directory
No such package: /var/log/packages/jre. Can't remove.

Then it's probably not installed. At least not the Slackware way.

Now what to do about that file you downloaded. You need to get the Slackbuild in Extra from a Slackware 14 mirror, then build the java package. Here is an example on how to do that.

From your home directory:
Code:

# make a directory to do the work
mkdir ~/sunjava
# change to it
cd ~/sunjava/
# download the files you will need in one shot
lftp -c "open http://mirrors.slackware.com/slackware/slackware-14.0/extra/java/; mirror -X *.mirrorlist"
# move jre-7u17-linux-i586.tar.gz in to the sunjava directory
# once that is done you are ready to build the package
# change to root
su -
# cd back
cd /home/<yourhome>/sunjava/
# Then build the java package
sh java.Slackbuild
## After a few minutes your will see Slackware package /tmp/jre-7u17-i586-1.txz created.
# next install it
upgradepkg --install-new /tmp/jre-7u17-i586-1.txz
# That's it

Or follow that link allend posted

Sandlin 03-18-2013 07:05 PM

Reply:
Yes, I disabled Java in the browser. The old version is 1.6.0-25.

I'll follow the below directions and report back.



Quote:

Originally Posted by chrisretusn (Post 4913589)
How did you disable it? Just in the browser perhaps?

Code:

java -version
Will give you version information, unless it is already removed.

If it was installed when you installed Slackware 13.37 then:
Code:

removepkg jre
should remove it. If that returns
Code:

ls: cannot access /var/log/packages/jre*: No such file or directory
No such package: /var/log/packages/jre. Can't remove.

Then it's probably not installed. At least not the Slackware way.

Now what to do about that file you downloaded. You need to get the Slackbuild in Extra from a Slackware 14 mirror, then build the java package. Here is an example on how to do that.

From your home directory:
Code:

# make a directory to do the work
mkdir ~/sunjava
# change to it
cd ~/sunjava/
# download the files you will need in one shot
lftp -c "open http://mirrors.slackware.com/slackware/slackware-14.0/extra/java/; mirror -X *.mirrorlist"
# move jre-7u17-linux-i586.tar.gz in to the sunjava directory
# once that is done you are ready to build the package
# change to root
su -
# cd back
cd /home/<yourhome>/sunjava/
# Then build the java package
sh java.Slackbuild
## After a few minutes your will see Slackware package /tmp/jre-7u17-i586-1.txz created.
# next install it
upgradepkg --install-new /tmp/jre-7u17-i586-1.txz
# That's it

Or follow that link allend posted



All times are GMT -5. The time now is 10:38 AM.