LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Using slackpkg to download from a mirror (https://www.linuxquestions.org/questions/slackware-14/using-slackpkg-to-download-from-a-mirror-4175659615/)

CyDFect 08-22-2019 02:47 PM

Using slackpkg to download from a mirror
 
I am trying to install Java, I have the link here, and I would like to install it the correct way (using slackpkg). How can I do this? For some reason the files I am trying to download aren't on my Slackware installation disk.

Mechanikx 08-22-2019 06:42 PM

Quote:

Originally Posted by CyDFect (Post 6028355)
I am trying to install Java, I have the link here, and I would like to install it the correct way (using slackpkg). How can I do this? For some reason the files I am trying to download aren't on my Slackware installation disk.

I don't use slackpkg so I'm not sure if you can "point" it to the /extra directory. But you could just use wget?

Code:

wget -r -np -nH --cut-dirs=3 -R "index.html*" https://mirror.csclub.uwaterloo.ca/slackware/slackware-14.2/extra/java/
Just replace the mirror with your preferred one.

And just in case you haven't already, take a look at this:

Java in Slackware

Lysander666 08-23-2019 08:45 AM

Quote:

Originally Posted by CyDFect (Post 6028355)
For some reason the files I am trying to download aren't on my Slackware installation disk.

And what version of Slackware is your installation disk?

I'm sure you can notice that the version in /extra is extremely old. It would not be advisable to install this version. As much as it is noble for you to want to attempt to install Java in the time-honoured method, I believe the time-honoured method is not suitable in this case. It may be better to install one of these versions of openjdk instead:

http://www.slackware.com/~alien/slac...openjdk/pkg64/

Requesting thread move to the Slackware forum.

Mechanikx 08-23-2019 06:30 PM

Quote:

Originally Posted by Lysander666 (Post 6028598)
And what version of Slackware is your installation disk?

I'm sure you can notice that the version in /extra is extremely old. It would not be advisable to install this version. As much as it is noble for you to want to attempt to install Java in the time-honoured method, I believe the time-honoured method is not suitable in this case. It may be better to install one of these versions of openjdk instead:

http://www.slackware.com/~alien/slac...openjdk/pkg64/

Requesting thread move to the Slackware forum.

extra/java doesn't contain the actual Java binary. Only the java.SlackBuild to repackage the binary, scripts to populate the environment, etc. You would have to download the binary from Oracle's site. FWIW I used the java.SlackBuild from extra/java to install the latest JDK: jdk-12.0.2_linux-x64_bin.tar.gz and it installed fine. I then wrote a small "hello world" program in Java, compiled it and ran it without problems.

The only thing is if the OP wants to do it this way on 32-bit, the last 32-bit version I could find on Oracle's site is EOL and requires an account to download. So, openJDK could be the better way to go.

I don't have much experience with Java besides what I wrote above, so if I missed something I apologize.

CyDFect 08-23-2019 07:13 PM

Quote:

Originally Posted by Mechanikx (Post 6028772)
extra/java doesn't contain the actual Java binary. Only the java.SlackBuild to repackage the binary, scripts to populate the environment, etc. You would have to download the binary from Oracle's site. FWIW I used the java.SlackBuild from extra/java to install the latest JDK: jdk-12.0.2_linux-x64_bin.tar.gz and it installed fine. I then wrote a small "hello world" program in Java, compiled it and ran it without problems.

The only thing is if the OP wants to do it this way on 32-bit, the last 32-bit version I could find on Oracle's site is EOL and requires an account to download. So, openJDK could be the better way to go.

I don't have much experience with Java besides what I wrote above, so if I missed something I apologize.

Whenever I try this, the script gets stuck at the line "usr/mime", I have no idea what it's doing/trying to do, but that's the last thing it outputs before it just freezes.

Mechanikx 08-23-2019 08:06 PM

Quote:

Originally Posted by CyDFect (Post 6028784)
Whenever I try this, the script gets stuck at the line "usr/mime", I have no idea what it's doing/trying to do, but that's the last thing it outputs before it just freezes.

Not sure. Unfortunately, like I said above, I don't have much experience working with Java. Everything worked fine for me on a 64-bit system.

From the link you provided in your original post I'm guessing you're wanting to install JDK on 32-bit system? Did you try and install the latest JDK, the one I mentioned? That one is only for 64-bit. If you try to install that on a 32-bit system, it should install fine, but you will get a run-time error.

If you're determined to do it this way you'll have to install a 32-bit version of JDK:

jdk-8u221

But you have to sign up for an account first before you can download it.

It's probably easier to go with Lysander666's suggestion and install openJDK. When you open that link click on 'parent directory' then 'pkg' to access the 32-bit versions.

abga 08-23-2019 08:16 PM

@CyDFect

You should build your own JDK package from SlackBuilds, then you can use the standard Slackware package tools installpkg/removepkg:
http://www.slackbuilds.org/repositor...velopment/jdk/
Here's an example on how to use SlackBuilds (in case you're inexperienced):
https://www.linuxquestions.org/quest...4/#post6027334
And you can get the Oracle JDK package without registering:
https://www.linuxquestions.org/quest...ml#post6023483

Mechanikx 08-23-2019 08:30 PM

Quote:

Originally Posted by abga (Post 6028798)
@CyDFect

You should build your own JDK package from SlackBuilds, then you can use the standard Slackware package tools installpkg/removepkg:
http://www.slackbuilds.org/repositor...velopment/jdk/
Here's an example on how to use SlackBuilds (in case you're inexperienced):
https://www.linuxquestions.org/quest...4/#post6027334
And you can get the Oracle JDK package without registering:
https://www.linuxquestions.org/quest...ml#post6023483

Thanks! It didn't occur to me to check if there was a workaround for the registration.


All times are GMT -5. The time now is 08:48 PM.