LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-20-2015, 10:37 PM   #1
ginkgo
LQ Newbie
 
Registered: Sep 2009
Posts: 18

Rep: Reputation: 1
scala 2.11.7 not run without root permissions, jdk 1.8.0u60


Hi everybody,
I current study the scala, but I meet some problems, I install the slackware-current 32bit in the vmware, And install the jdk 1.8.0u60 and scala-2.11.7, with the root user, I can enter interactive mode , ane everything is ok. When I change to normal user, I can NOT run the scala interactive, but run scala --version can correct output the info.

So I install the centos 7.1 mini, the same jdk and scala , the normal user can run fine.

Can someone help me? I like the slackware and do not want to change to centos.


regard

Last edited by ginkgo; 09-22-2015 at 08:27 PM.
 
Old 09-21-2015, 12:06 AM   #2
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
How did you install scala?
 
Old 09-21-2015, 02:29 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Slackware : You can use the Slackbuild ...
http://slackbuilds.org/repository/14...lopment/scala/
... and use scala-2.11.7.tgz instead of scala-2.7.7.final.tgz .

Edit the scala.SlackBuild to the new version :
Line 9 to : VERSION=${VERSION:-2.11.7}
Line 49 : mv $TMP/$PRGNAM-$VERSION/{bin,lib,man} $PKG/$LIBDIR/$PRGNAM

( The edited scala.SlackBuild is attached.)
-
Attached Files
File Type: txt scala.SlackBuild.txt (1.7 KB, 17 views)
 
Old 09-21-2015, 07:52 PM   #4
ginkgo
LQ Newbie
 
Registered: Sep 2009
Posts: 18

Original Poster
Rep: Reputation: 1
I install jdk and scala ,use the build script form slackbuilds, just like @knudfl said. the root user is fine,

http://i11.tietuku.com/e6a144555cd4e39d.png
 
Old 09-21-2015, 11:24 PM   #5
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,068

Rep: Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145
trying to translate the error, it seems the scala interpreter is not able to find java.
wild guessing:
have you reboot your virtual machine after installing jdk?
 
Old 09-22-2015, 02:57 AM   #6
ginkgo
LQ Newbie
 
Registered: Sep 2009
Posts: 18

Original Poster
Rep: Reputation: 1
yes, I reboot the machine, the root user can run fine, just logout and change to normal user, the result is upper pic.

http://i3.tietuku.com/660c5516e1b4caa2.png

this is the root screen snap.

Last edited by ginkgo; 09-22-2015 at 03:01 AM.
 
Old 09-22-2015, 03:19 AM   #7
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,068

Rep: Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145
here it works, on 32 and 64bit.

the only difference that I seem to spot in the output from your screens is that I have a "Server VM", not a "Client VM"
Code:
$ scala
Welcome to Scala version 2.11.7 (Java HotSpot(TM) Server VM, Java 1.8.0_60).
Type in expressions to have them evaluated.
Type :help for more information.

scala> 1 + 2
res0: Int = 3
have you by any chance installed jre instead of jdk from SBo?

(most probably shouldn't matter but it won't hurt) are you using a full install of Slackware?

Last edited by ponce; 09-22-2015 at 03:21 AM.
 
Old 09-22-2015, 06:08 AM   #8
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105
Quote:
Originally Posted by ponce View Post
here it works, on 32 and 64bit.

the only difference that I seem to spot in the output from your screens is that I have a "Server VM", not a "Client VM"
Code:
$ scala
Welcome to Scala version 2.11.7 (Java HotSpot(TM) Server VM, Java 1.8.0_60).
Type in expressions to have them evaluated.
Type :help for more information.

scala> 1 + 2
res0: Int = 3
have you by any chance installed jre instead of jdk from SBo?

(most probably shouldn't matter but it won't hurt) are you using a full install of Slackware?
The client or server VM selection is not dependent on using the JDK or the JRE. It is done by Java based on the hardware it is running on: see http://docs.oracle.com/javase/8/docs...ver-class.html
 
1 members found this post helpful.
Old 09-22-2015, 06:17 AM   #9
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,068

Rep: Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145
Quote:
Originally Posted by Alien Bob View Post
The client or server VM selection is not dependent on using the JDK or the JRE. It is done by Java based on the hardware it is running on: see http://docs.oracle.com/javase/8/docs...ver-class.html
thanks Eric for clarifying this!
 
Old 09-22-2015, 08:16 AM   #10
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Perhaps the scala interpreter is writing to a file somewhere that is owned by root. Or one of the jars that it is using has incorrect permissions.
 
Old 09-22-2015, 03:56 PM   #11
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,068

Rep: Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145
last thing I can think to let you try is upgradepkg your packages with the ones I built here

(link removed)

Last edited by ponce; 09-23-2015 at 01:41 AM. Reason: temporary link removed
 
Old 09-22-2015, 08:27 PM   #12
ginkgo
LQ Newbie
 
Registered: Sep 2009
Posts: 18

Original Poster
Rep: Reputation: 1
Good news and strange news. I download the new slackware-current from Alien site, I install the new vmware machine full install all except the kde,kdel.

I installpkg the 2 package that ponce post, the scala run fine. That is a good new.

Thanks Ponce, Alien, Eric and other guys .


btw. ponce can you share the script of jdk,scala, or can you figure out the different with the slackbuilds.
 
Old 09-23-2015, 12:16 AM   #13
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,068

Rep: Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145
for jdk I used the one on SBo, for scala you can find it in /usr/doc/scala-2.11.7/scala.SlackBuild
 
  


Reply

Tags
scala


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
impossible situation. root is Permission denied to run a script with 777 permissions lleb Linux - General 11 01-01-2014 06:06 PM
Wondering How to Install JDK Runtime in Manjaro to Run Minecraft nickkourpias Linux - Software 6 12-11-2012 01:41 AM
[SOLVED] How to run File Browser with root permissions AlexFr Red Hat 1 07-05-2012 05:52 AM
Granting root permissions to a bash script than can be run by a user? SirTristan Linux - Newbie 4 06-14-2008 10:29 PM
[SOLVED] How to run Sun JDK 1.5 without conflict from libgcj? rhimbo Linux - Software 1 12-08-2004 06:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration