在 R 中安装 tar.gz 包时出错

Error while installing a tar.gz package in R

当我尝试从 http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz 安装 R 包 nlopt-2.4.2.tar.gz 时,使用 sudo R CMD INSTALL nlopt -2.4.2.tar.gz,
我收到以下错误:

Error in untar2(tarfile, files, list, exdir, restore_times) :
unsupported entry type ‘’

不是一个R包!

如果您表演 tar,拉皮舞:

tar xvfz nlopt-2.4.2.tar.gz

并查看自述文件,您会得到:

NLopt is a library for nonlinear local and global optimization, for functions with and without gradient information. It is designed as as simple, unified interface and packaging of several free/open-source nonlinear optimization libraries.

The latest release and a complete manual may be found at the NLopt home page: http://ab-initio.mit.edu/nlopt

It is compiled and installed with the standard GNU autoconf/automake commands:

./configure
make
make install

-- snip --