Installing /usr/local/bin/java on Synology NAS

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
jazzperm
Posts: 11
Joined: 22 Oct 2013, 09:32

Installing /usr/local/bin/java on Synology NAS

Post by jazzperm »

I have used filebot with Utorrent on my windows machine for several years. Now I bought a synology NAS and hope to make use of filebot with my nas too. So I started to download all filebot packages and now I installed JAVA. Now I am stuck at creating the link to /usr/local/bin/java.

This is all quit new to my, so my apologises for rookie mistakes. I have come this far on my own and hope you can help me further:

Code: Select all

NASDS413J> cd /volume1/local/jdk1.8.0_73/bin
NASDS413J> pwd
/volume1/local/jdk1.8.0_73/bin
NASDS413J> ls
appletviewer  javah         jmap          orbd          tnameserv
extcheck      javap         jps           pack200       unpack200
idlj          jcmd          jrunscript    policytool    wsgen
jar           jconsole      jsadebugd     rmic          wsimport
jarsigner     jdb           jstack        rmid          xjc
java          jdeps         jstat         rmiregistry
java-rmi.cgi  jhat          jstatd        schemagen
javac         jinfo         keytool       serialver
javadoc       jjs           native2ascii  servertool
NASDS413J>
NASDS413J> ln -s /volume1/local/jdk1.8.0_73/bin/java /usr/local/bin/java
ln: /usr/local/bin/java: File exists
NASDS413J> ln -s -f /volume1/local/jdk1.8.0_73/bin/java /usr/local/bin/java
NASDS413J> filebot -version
/usr/local/bin/filebot: line 53: java: not found
NASDS413J>

I checked the commands I give in putty, but dont see whats wrong. Java is installed, but cant create the link to urs/local/bin/java.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Create link to usr/local/bin/java

Post by rednoah »

I made an installer package. It's in the FileBot package source. Have you tried it yet?

@see viewtopic.php?f=13&t=3368
:idea: Please read the FAQ and How to Request Help.
jazzperm
Posts: 11
Joined: 22 Oct 2013, 09:32

Re: Installing /usr/local/bin/java on Synology NAS

Post by jazzperm »

Yes, tried that first. But then I also got the message that java was missing. When I try your Java Installer again it says an error occured (after downloading and accepting terms). But that makes sense I think because I installed java manually!?
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Installing /usr/local/bin/java on Synology NAS

Post by rednoah »

No logs. No help. Bye.
:idea: Please read the FAQ and How to Request Help.
jazzperm
Posts: 11
Joined: 22 Oct 2013, 09:32

Re: Installing /usr/local/bin/java on Synology NAS

Post by jazzperm »

So I found this logfile: synopkg.log

Code: Select all

2016/03/24 22:21:29	install	oracle-java 1.8.0_77:
			End:	/bin/mv -f /volume1/@tmp/pkginstall/scripts /var/packages/oracle-java/scripts	ret=[0]
2016/03/24 22:21:29	install	oracle-java 1.8.0_77:
			Begin:	postinst
Unkown CPU architecture: armv5tel
Ooops, something went wrong... View Log for details.
2016/03/24 22:21:29	install	oracle-java 1.8.0_77:
			End:	postinst	ret=[0]
2016/03/24 22:21:30	install oracle-java: begin to start version 1.8.0_77
2016/03/24 22:21:30	install oracle-java: start version 1.8.0_77 successfully, result 0
2016/03/24 22:21:30	install	oracle-java 1.8.0_77:
			Begin:	/bin/rm -rf /volume1/@tmp/pkginstall
2016/03/24 22:21:30	install	oracle-java 1.8.0_77:
			End:	/bin/rm -rf /volume1/@tmp/pkginstall	ret=[0]
2016/03/24 22:21:30	install oracle-java 1.8.0_77 successfully
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Installing /usr/local/bin/java on Synology NAS

Post by rednoah »

Well, clicking on View Log in the package page would have told you that. :D

Java SE doesn't support armv5tel so you'll have to figure out how to install the Embedded JDK for your platform yourself. Google it.

Here's a video tutorial if you're command-line savvy:
https://www.youtube.com/watch?v=8N6hYNj_QzY
:idea: Please read the FAQ and How to Request Help.
jazzperm
Posts: 11
Joined: 22 Oct 2013, 09:32

Re: Installing /usr/local/bin/java on Synology NAS

Post by jazzperm »

THnx for your reply. See my first post. I was following that tutorial and got stuck on creating the symbolic link:

Code: Select all

NASDS413J> cd /volume1/local/jdk1.8.0_73/bin
NASDS413J> pwd
/volume1/local/jdk1.8.0_73/bin
NASDS413J> ls
appletviewer  javah         jmap          orbd          tnameserv
extcheck      javap         jps           pack200       unpack200
idlj          jcmd          jrunscript    policytool    wsgen
jar           jconsole      jsadebugd     rmic          wsimport
jarsigner     jdb           jstack        rmid          xjc
java          jdeps         jstat         rmiregistry
java-rmi.cgi  jhat          jstatd        schemagen
javac         jinfo         keytool       serialver
javadoc       jjs           native2ascii  servertool
NASDS413J>
NASDS413J> ln -s /volume1/local/jdk1.8.0_73/bin/java /usr/local/bin/java
ln: /usr/local/bin/java: File exists
NASDS413J> ln -s -f /volume1/local/jdk1.8.0_73/bin/java /usr/local/bin/java
NASDS413J> filebot -version
/usr/local/bin/filebot: line 53: java: not found
WHen I check the directoreis, Java is extracted there. I tries 2 command for creating the symbolic link, but it's not working. Do you see what I am doing wrong in the last lines above?
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Installing /usr/local/bin/java on Synology NAS

Post by rednoah »

You skipped the part where you check if the java executable is actually working:
https://youtu.be/8N6hYNj_QzY?t=75
:idea: Please read the FAQ and How to Request Help.
jazzperm
Posts: 11
Joined: 22 Oct 2013, 09:32

Re: Installing /usr/local/bin/java on Synology NAS

Post by jazzperm »

Seems I managed it:

Jasper@NASDS413J:~$ filebot -version
FileBot 4.6.1 (r3315) / Java(TM) SE Embedded Runtime Environment 1.8.0_77 (headless)

Thnx for your patience! Now this part is done I hope to make download station make a post process!
snerf
Posts: 1
Joined: 25 Apr 2016, 09:27

Re: Installing /usr/local/bin/java on Synology NAS

Post by snerf »

jazzperm wrote:Seems I managed it:

Jasper@NASDS413J:~$ filebot -version
FileBot 4.6.1 (r3315) / Java(TM) SE Embedded Runtime Environment 1.8.0_77 (headless)

Thnx for your patience! Now this part is done I hope to make download station make a post process!
How did you manage it?
I have the exact same issue, following the same video and when I come to creating the symbolic link it seems to work but then the java commands and filebot commands don't work.

Code: Select all

admin@DiskStation:/usr/local/bin$ ln -s -f :/volume1/local/ejdk1.8.0_91/linux_arm_sflt/jre/bin/java /usr/local/bin/java
ln: failed to create symbolic link ‘/usr/local/bin/java’: Permission denied
admin@DiskStation:/usr/local/bin$ sudo ln -s -f :/volume1/local/ejdk1.8.0_91/linux_arm_sflt/jre/bin/java /usr/local/bin/java
admin@DiskStation:/usr/local/bin$ ls
feasibilitycheck  filebot  java  node  npm  nvm  php56  php56-cgi  php56-fpm  phpdbg56
admin@DiskStation:/usr/local/bin$ java
-sh: java: command not found
admin@DiskStation:/usr/local/bin$ ./java
-sh: ./java: No such file or directory
admin@DiskStation:/usr/local/bin$
Post Reply