在我最近无法升级到Ubuntu 14.10后,安装程序将我的系统恢复到标准的14.04配置(这就是它所说的)。现在我在使用R中的rJava和OpenStreetMap包时遇到了问题。
sudo update-alternatives --config java
的输出
是;
There are 3 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 auto mode
1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 manual mode
* 2 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 manual mode
3 /usr/lib/jvm/jre1.7.0/jre1.7.0_21/bin/java 3 manual mode
然后我运行:sudo R CMD javareconf
:
/usr/lib/R/etc/ldpaths: line 1: :/usr/lib/jvm/java-7-openjdk-amd64/jre: No such file or directory
/usr/lib/R/etc/ldpaths: line 1: :/usr/lib/jvm/java-7-openjdk-amd64/jre: No such file or directory
Java interpreter : /usr/bin/java
Java version : 1.7.0_75
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
trying to compile and link a JNI progam
detected JNI cpp flags : -I$(JAVA_HOME)/../include
detected JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -ljvm
/usr/lib/R/etc/ldpaths: line 1: :/usr/lib/jvm/java-7-openjdk-amd64/jre: No such file or directory
/usr/lib/R/etc/ldpaths: line 1: :/usr/lib/jvm/java-7-openjdk-amd64/jre: No such file or directory
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/usr/lib/jvm/java-7-openjdk-amd64/jre/../include -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c conftest.c -o conftest.o
gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o conftest.so conftest.o -L/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server -ljvm -L/usr/lib/R/lib -lR
JAVA_HOME : /usr/lib/jvm/java-7-openjdk-amd64/jre
Java library path: $(JAVA_HOME)/lib/amd64/server
JNI cpp flags : -I$(JAVA_HOME)/../include
JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -ljvm
Updating Java configuration in /usr/lib/R
Done.
但是,如果我开始在R工作,我会收到消息:
/usr/lib/R/etc/ldpaths: line 1: :/usr/lib/jvm/java-7-openjdk-amd64/jre: No such file or directory
OpenStreetMap会抛出以下错误:
java.lang.NullPointerException
at edu.cens.spatial.RTileController.getTileValues(RTileController.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at RJavaTools.invokeMethod(RJavaTools.java:386)
Error in osmtile(x, y, zoom, type) : could not obtain tile: 39746 1 2
我该怎么办?我使用的脚本很长时间没有改变,之前工作正常(我不确定失败的升级是否与错误有关)