Windows R:使用油灰安装包装

Windows R:使用油灰安装包装,windows,r,putty,Windows,R,Putty,在windows上运行R脚本后,我想使用另一台服务器计算机进行计算。我使用putty和云计算提供商slicify 这就是我到目前为止所做的: sudo tsocks apt-get install r-base-core #R sudo tsocks apt-get install default-jre #java sudo apt-get install r-base-dev tsocks wget #to upload my R script tsocks wget #to upload

在windows上运行R脚本后,我想使用另一台服务器计算机进行计算。我使用putty和云计算提供商slicify

这就是我到目前为止所做的:

sudo tsocks apt-get install r-base-core #R
sudo tsocks apt-get install default-jre #java
sudo apt-get install r-base-dev
tsocks wget #to upload my R script
tsocks wget #to upload data which are used by the R script
到目前为止还不错。然后我运行R并进入R环境

在R中,我尝试安装一些软件包,如:

install.packages("nloptr", repors="")
这就是下面的内容:

Installing package(s) into ‘/home/slicify/R/x86_64-pc-linux-gnu-library/2.14’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
然后我在瑞士选择一台服务器并继续。这需要很多时间,最后我得到了这个错误:

Warning: unable to access index for repository http://stat.ethz.ch/CRAN/src/contrib
Warning messages:
1: In open.connection(con, "r") :
  unable to connect to 'cran.r-project.org' on port 80.
2: In getDependencies(pkgs, dependencies, available, lib) :
  package ‘nloptr’ is not available (for R version 2.14.1)
有人能帮我解决上述问题吗?多谢各位

更新:

命令行上的错误不会继续

install.packages("nlopt-2.4.2.tar.gz",repos = NULL, type="source")

Installing package(s) into ‘/home/slicify/R/x86_64-pc-linux-gnu-library/2.14’
(as ‘lib’ is unspecified)
ERROR: cannot extract package from ‘nlopt-2.4.2.tar.gz’
Warning message:
In install.packages("nlopt-2.4.2.tar.gz", repos = NULL, type = "source") :
  installation of package ‘nlopt-2.4.2.tar.gz’ had non-zero exit status
> install.packages("nloptr_1.0.4.tar.gz",repos = NULL, type="source")
Installing package(s) into ‘/home/slicify/R/x86_64-pc-linux-gnu-library/2.14’
(as ‘lib’ is unspecified)
* installing *source* package ‘nloptr’ ...
** package ‘nloptr’ successfully unpacked and MD5 sums checked
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for pkg-config... no
configure: Now testing for NLopt header file.
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking nlopt.h usability... no
checking nlopt.h presence... no
checking for nlopt.h... no
configure: Need to download and build NLopt
trying URL 'http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz'
Error in download.file(url = "http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz",  :
  cannot open URL 'http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz'
In addition: Warning message:
In download.file(url = "http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz",  :
  unable to connect to 'ab-initio.mit.edu' on port 80.
Execution halted
/bin/tar: This does not look like a tar archive

gzip: stdin: unexpected end of file
/bin/tar: Child returned status 1
/bin/tar: Error is not recoverable: exiting now
Warning message:
In untar(tarfile = "nlopt-2.4.2.tar.gz") :
  '/bin/tar -xf 'nlopt-2.4.2.tar.gz'' returned error code 2
configure: Starting to install library to /tmp/Rtmpch92Ql/R.INSTALL31457068e238/nloptr/nlopt-2.4.2
./configure: line 3325: cd: nlopt-2.4.2: No such file or directory

你到底在哪里?第二个警告建议从源代码编译一个R包。1-下载源代码zip,2-安装.packages/path/to/file/nloptr.tgz,repos=NULL,type=source。对于第一个警告检查,如果您有防火墙/或其他服务阻止端口80。您可能需要向slicify支持团队寻求帮助。。。nloptr应该以二进制文件的形式提供,就像现有的一样。您可以使用sudo apt get install r-cran-nloptr…@Valegard234:要安装.zip文件,您不应该使用type=source;当且仅当您拥有nloptr_1.0.4.tar.gz时,使用type=source