64-bit Windows in installing rJava and Rwordseg times errors as well as solutions, the detailed procedure is as follows.
> install.packages('rJava')
--- Use the CRAN mirror for this connection phase ---.
试开URL’http://mirrors.xmu.edu.cn/CRAN/bin/windows/contrib/3.1/rJava_0.9-7.zip'
Content type 'application/zip' length 761221 bytes (743 KB)
The URL is open.
downloaded 743 KB
Package 'rJava' opened successfully, MD5 and check also passed.
The downloaded binary package is available in the
C:\Users\asus\AppData\Local\Temp\RtmpUT48J3\downloaded_packages
There is no problem installing rJava through install.packages(‘ rJava ‘).
> library(rJava)
Error : loadNamespace().onLoad failed when calculating 'rJava', details.
Call: inDL(x, as.logical(local), as.logical(now), ...)
Error: Unable to load shared target 'C:/Program Files/R/R-3.1.3/library/rJava/libs/i386/rJava.dll'::
LoadLibrary failure: %1 Not a valid Win32 application.
Error: 'rJava' programming package or namespace failed to load.
RJava loading error: The R client USES Windows 32bit, the operating system version is 64bit, and the system installed Java is 64bit, which is not compatible with rJava.
C:\Users\asus>java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) **64-Bit** Server VM (build 25.45-b02, mixed mode)
The solution, using a 32-bit JRE, is to reset the environment variable.
> Sys.setenv(JAVA_HOME='C:\\Program Files (x86)\\Java\\jre6')
> library('rJava')
Resetting the environment variables before loading rJava, OK
> install.packages("Rwordseg", repos = "http://R-Forge.R-project.org", type = "source")
试开URL’http://R-Forge.R-project.org/src/contrib/Rwordseg_0.2-1.tar.gz'
Content type 'application/x-gzip' length 5445754 bytes (5.2 MB)
打开了URL
downloaded 5.2 MB
* installing *source* package 'Rwordseg' ...
** R
** demo
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
2015-8-31 11:34:07 org.ansj.util.MyStaticValue <clinit>
Warning: not find library.properties in classpath use it by default !
2015-8-31 11:34:08 org.ansj.library.UserDefineLibrary loadLibrary
Warning: init userLibrary waring :library/default.dic because : not find that file or can not to read !
2015-8-31 11:34:08 org.ansj.library.UserDefineLibrary initAmbiguityLibrary
Warning: init ambiguity waring :library/ambiguity.dic because : not find that file or can not to read !
2015-8-31 11:34:08 org.ansj.library.UserDefineLibrary loadFile
Message: init user userLibrary ok path is : C:\Program Files\R\R-3.1.3\library\Rwordseg\config\userdic
2015-8-31 11:34:09 org.ansj.library.InitDictionary init
Message: init core library ok use time :1570
2015-8-31 11:34:11 org.ansj.library.NgramLibrary <clinit>
Message: init ngram ok use time :1492
*** arch - x64
Agu 31, 2015 11:34:14 上午 org.ansj.util.MyStaticValue <clinit>
Warning: not find library.properties in classpath use it by default !
Agu 31, 2015 11:34:14 上午 org.ansj.library.UserDefineLibrary loadLibrary
Warning: init userLibrary waring :library/default.dic because : not find that file or can not to read !
Agu 31, 2015 11:34:14 上午 org.ansj.library.UserDefineLibrary initAmbiguityLibrary
Warning: init ambiguity waring :library/ambiguity.dic because : not find that file or can not to read !
Agu 31, 2015 11:34:14 上午 org.ansj.library.UserDefineLibrary loadFile
Message: init user userLibrary ok path is : C:\Program Files\R\R-3.1.3\library\Rwordseg\config\userdic
Agu 31, 2015 11:34:15 上午 org.ansj.library.InitDictionary init
Message: init core library ok use time :1107
Agu 31, 2015 11:34:16 上午 org.ansj.library.NgramLibrary <clinit>
Message: init ngram ok use time :675
* DONE (Rwordseg)
The downloaded package is available in the
‘C:\Users\asus\AppData\Local\Temp\RtmpUT48J3\downloaded_packages’
> library(Rwordseg)
# Version: 0.2-1
Installation of Rwordseg is complete.
One thing to note here is the version of the JRE. Make sure it’s 32-bit.
Read More:
- [Solved] Error: package or namespace load failed for ‘ggplot2’ in loadNamespace(i, c(lib.loc, .libPaths()), v
- An error was reported when Maven package was running the packaged jar package: there is no main list attribute in xxx.jar, which can be solved by configuring Maven plugin
- [Solved] FileUploadException: the request was rejected because no multipart boundary was found
- [Solved] Vue3 Error: export ‘createRouter‘ was not found in ‘vue-router‘
- [Solved] Instantiation of ‘sdram_model_plus‘ failed. The design unit was not found.
- [Solved] error: ‘xcb_generic_event_t’ was not declared in this scope
- [Solved] Vscode Error: “export ‘default‘ (imported as ‘VueRouter‘) was not found in ‘vue-router‘
- Git Error: failed: The TLS connection was non-properly terminated
- [Solved] A needed class was not found. This could be due to an error in your runpath. Missing class: scala/co
- [Solved] Windows Nginx Startup Error: bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket
- [Solved] error: ‘CV_GRAY2BGR’ was not declared in this scope
- blackduck Error: Request failed authorization [HTTP Error]: XXX, response was 403 Forbidden.
- [Solved] MIT cheetah make error: ‘ioctl’ was not declared in this scope
- How to Solve Error:‘itoa’ was not declared in this scope
- [Solved] git error: RPC failed; curl 56 Recv failure:Connection was resetB/s
- Kafka error: ERROR There was an error in one of the threads during logs loading: java.lang.NumberFormatException: For input string: “derby” (kafka.log.LogManager)
- Echars 5.0 Import Error: “export ‘default’ (imported as ‘echarts’) was not found in ‘echarts’
- Git push error: error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
- [Solved] Pip install icu failed: Command “python setup.py egg_info” failed with error code 1 in
- [Solved] Virtualenvwrapper.sh error: There was a problem running the initialization hooks.