Setting up sbt (0.13.15.3) ... /usr/share/sbt/bin/sbt-launch-lib.bash:
line 73: java: command not found
dpkg: error processing package sbt
(--configure): subprocess installed post-installation script returned
error exit status 127
I have the Java bin directory in PATH and I've also set JAVA_HOME:
$ java -version
openjdk version "1.8.0_131" OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-0ubuntu1.16.04.2-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
Related
Trying to install qt in macOS Sierra (10.12.6) using brew. I run $ brew info qt and get the following:
$ brew info qt
qt: stable 5.15.0, HEAD [keg-only]
Cross-platform application and UI framework
https://www.qt.io/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/qt.rb
==> Dependencies
Build: pkg-config ✔
==> Requirements
Build: xcode ✔
Required: macOS >= 10.12 ✔
With this I assume I have everything required to install it. However, if I run $ brew install qt, this appears:
1 error generated.
make: *** [qcore_mac.o] Error 1
make: *** Waiting for unfinished jobs....
Error: You are using macOS 10.12.
What is wrong then?
Context:
I am working with terminal and have little coding background. I'm trying to install gnuplot and I'm only missing qt and pango dependencies.
I installed Cupy using the binary package cupy-cuda92, but CuDNN is not loaded.
$ pip install cupy-cuda92==5.4.0 chainer==5.4.0
$ python -c 'import chainer; chainer.print_runtime_info()'
/home/xxxxx/.pyenv/versions/3.5.2/lib/python3.5/site-packages/chainer/backends/cuda.py:98: UserWarning: cuDNN is not enabled.
Please reinstall CuPy after you install cudnn
(see https://docs-cupy.chainer.org/en/stable/install.html#install-cudnn).
'cuDNN is not enabled.\n'
Platform: Linux-4.4.0-103-generic-x86_64-with-debian-stretch-sid
Chainer: 5.3.0
NumPy: 1.16.2
CuPy:
CuPy Version : 5.3.0
CUDA Root : /usr/local/cuda
CUDA Build Version : 9020
CUDA Driver Version : 9020
CUDA Runtime Version : 9020
cuDNN Build Version : None
cuDNN Version : None
NCCL Build Version : 2307
NCCL Runtime Version : 2402
iDeep: Not Available
I tried uninstalling & reinstalling chainer and cupy with --no-cache-dir but saw no difference. I also confirmed that CUDA is 9.2.
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Wed_Apr_11_23:16:29_CDT_2018
Cuda compilation tools, release 9.2, V9.2.88
I found the problem and a solution on my own.
First I tried to import cudnn directly.
$ python
Python 3.5.2 (default, Mar 25 2019, 10:54:56)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cupy.cuda.cudnn
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: /home/xxxxx/.pyenv/versions/3.5.2/lib/python3.5/site-packages/cupy/cuda/cudnn.cpython-35m-x86_64-linux-gnu.so: symbol cudnnGetBatchNormalizationTrainingExReserveSpaceSize, version libcudnn.so.7 not defined in file libcudnn.so.7 with link time reference
thus there is a kind of library version mismatch. I checked my LD_LIBRARY_PATH and found that different versions of CuDNN are installed via cudnnenv. I removed them from LD_LIBRARY_PATH and the problem was gone.
$ python -c 'import chainer; chainer.print_runtime_info()'
Platform: Linux-4.4.0-103-generic-x86_64-with-debian-stretch-sid
Chainer: 5.3.0
NumPy: 1.16.2
CuPy:
CuPy Version : 5.3.0
CUDA Root : /usr/local/cuda
CUDA Build Version : 9020
CUDA Driver Version : 9020
CUDA Runtime Version : 9020
cuDNN Build Version : 7402
cuDNN Version : 7500
NCCL Build Version : 2307
NCCL Runtime Version : 2402
iDeep: Not Available
I'm new to arduino and trying to get IDE installed.
Both the 32 and 64 bit versions of Linux arduino IDE fail.
Thanks!
jay#jay-desktop $ bash arduino
Picked up JAVA_TOOL_OPTIONS:
Exception in thread "main" java.lang.UnsupportedClassVersionError: processing/app/Base : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
java info
jay#jay-desktop $ javac -version
javac 1.7.0_95
jay#jay-desktop $ java -version
java version "1.7.0_95"
OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.14.04.1)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)
Sounds like you are trying to run a version of the IDE that has been compiled for Java 1.8 on Java 1.7. Upgrading java to 1.8 ought to fix it.
I have installed R on a Debian Wheezhy. I want to install rjava package, but I get this error:
configure: error: Cannot compile a simple JNI program. See config.log for details.
Make sure you have Java Development Kit installed and correctly registered in R.
If in doubt, re-run "R CMD javareconf" as root.
ERROR: configuration failed for package ‘rJava’
* removing ‘/home/babak/R/x86_64-pc-linux-gnu-library/2.15/rJava’
There is Java on my Linux, If I type Java -Version I see:
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.6) (6b24-1.11.5-1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
How can I solve this problem?
I have solved the problem using this command - shown in error description:
sudo R CMD javareconf
I had a similar problem while installing xlsx package that has some dependencies
maybe related to java and r java packages...
In order to solve your problem you have to:
- check environment variables $JAVA_HOME and $PATH
- sudo R CMD javareconf
If it doesn't help, try out my configuration with java-7-oracle,
install java-7-oracle via webupd8 repository Installing Java 7 (Oracle) in Debian via apt-get
set environment variables $JAVA_HOME and $PATH
export JAVA_HOME=/usr/lib/jvm/java-7-oracle
export PATH=$PATH:$JAVA_HOME/bin
sudo update-java-alternatives -s java-7-oracle
sudo R CMD javareconf
and than retry the installation of rjava
I hope it will help you!
After updating to R 3.0.1 on a Debian 64-bit machine, the rJava package does not want to install.
configuration failed, so sudo R CMD javareconf [this worked on another debian machine]. however it does not work here, has anybody else had this problem? [see terminal output below]
henk#crunchbang:~$ sudo R CMD javareconf
Java interpreter : /usr/bin/java
Java version : 1.6.0_18
Java home path : /usr/lib/jvm/java-6-openjdk/jre
Java compiler : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar
trying to compile and link a JNI progam
detected JNI cpp flags :
detected JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -ljvm
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -O3 -pipe -g -c conftest.c -o conftest.o
conftest.c:1:17: error: jni.h: No such file or directory
conftest.c: In function ‘main’:
conftest.c:4: warning: implicit declaration of function ‘JNI_CreateJavaVM’
make: *** [conftest.o] Error 1
Unable to compile a JNI program
Java library path:
JNI cpp flags :
JNI linker flags :
Updating Java configuration in /usr/lib64/R
Done.
# check java
henk#crunchbang:~$ java -version
java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8.13) (6b18-1.8.13-0+squeeze2)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)
java environment:
henk#crunchbang:~$ aptitude search "?provides(java-runtime)"
i A default-jre - Standard Java or Java compatible Runtime
i A default-jre-headless - Standard Java or Java compatible Runtime (headle
p gcj-4.4-jre - Java runtime environment using GIJ/classpath
p gcj-4.4-jre-headless - Java runtime environment using GIJ/classpath (he
p gcj-jre - Java runtime environment using GIJ/classpath
p gcj-jre-headless - Java runtime environment using GIJ/classpath (he
i A openjdk-6-jre - OpenJDK Java runtime, using Hotspot JIT
i A openjdk-6-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headles
i sun-java6-jre - Sun Java(TM) Runtime Environment (JRE) 6 (archit
I took these steps (on an EC2 with Ubuntu 14.04 and RStudio-Server) to install the R package qdap which requires rJava:
(I'm probably quoting other sources here and there and I don't remember from where, but thanks.)
Install these repositories from http://sites.psu.edu/theubunturblog/cran2deb4ubuntu/
(debian: http://r-forge.r-project.org/projects/cran2deb/)
sudo add-apt-repository ppa:marutter/rrutter
sudo add-apt-repository ppa:marutter/c2d4u
sudo apt-get update
Install Java:
sudo apt-get install openjdk-7-jdk
ls /usr/lib/jvm
Set a system-wide environment variable for Java:
sudo joe /etc/profile.d/javaenvvar.sh
which contains:
# JAVA environment variable
# for openjdk-7-jdk in order to use the R package `qdap`.
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre
export PATH=$PATH:$JAVA_HOME/bin
Then exit BASH and sign in again. Check your path changes:
echo $PATH
echo $JAVA_HOME
Then:
sudo R CMD javareconf
Should return:
Java interpreter : /usr/bin/java
Java version : 1.7.0_65
Java home path : /usr/lib/jvm/java-7-openjdk-amd64/jre
Java compiler : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar
Create the file /etc/ld.so.conf.d/java.conf with the following entries:
/usr/lib/jvm//usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64
/usr/lib/jvm//usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server
Then install rJava from those new repositories:
sudo apt-get install r-cran-rjava
That just installed rJava to /usr/lib/R/site-library which is accessible to all users of RStudio-Server, hopefully.
sudo update-alternatives --config java
Hopefully, there's only one java installed.
Update R packages:
sudo R
> packageStatus()
> update.packages()
Install R packages system wide (still within sudo R):
> install.packages("qdap", lib="/usr/lib/R/site-library")
Reset RStudio-Server:
Sign out of RStudio-Server first.
sudo rstudio-server stop
sudo rstudio-server start
Sign back in to RStudio-Server.
If you get a memory error, try detaching some packages.
The EC2 t2-micro has only 1 GB of RAM.
I had the same problem, the solution was updating to openjdk-7-* and use update-alternatives --config java to set the java-7-openjdk path.