提问者:小点点

R包安装错误"未知类型名称'R_CallMethodDef'"


我正在尝试使用install. packes()安装r包“spacesvd”,但在编译过程中出错。非常感谢任何帮助!

"未知类型名称'R_CallMethodDef'"

我还尝试了conda install-c r r-spacesvd;但是出错了。

解决环境:失败

PackagesNotFoundError:以下软件包无法从当前渠道获得:

  • r-spacesvd

当前频道:

>

  • https://conda.anaconda.org/r/linux-64
  • https://conda.anaconda.org/r/noarch
  • https://conda.anaconda.org/bioconda/linux-64
  • https://conda.anaconda.org/bioconda/noarch
  • https://conda.anaconda.org/conda-forge/linux-64
  • https://conda.anaconda.org/conda-forge/noarch
  • https://repo.anaconda.com/pkgs/r/linux-64
  • https://repo.anaconda.com/pkgs/r/noarch

    ...

    我试过了

    conda骨架cran--递归r-spacesvd conda build r-spacesvd

    虽然第一步成功,但构建失败了。

    停止执行r-spacesvd-0的测试失败。1_4-r341h96ca727_0. tar.bz2

    这里是session sionInfo。由于项目原因,我必须使用R3.3

    R版本3.3.2(2016-10-31)平台:x86_64-pc-linux-gnu(64位)运行在:CentOSLinux7(核心)

    LC_CTYPE=en_US. UTF-8LC_NUMERIC=C[3]LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8[5]LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8[7]LC_PAPER=en_US.UTF-8LC_NAME=C[9]LC_ADDRESS=C
    LC_TELEPHONE=C[11]LC_MEASUREMENT=en_US.UTF-8LC_IDENTIFICATION=C

    附加的基础包:[1]stats图形grDevices utils
    数据集方法基础

    通过命名空间加载(且未附加):[1]tools_3.3.2


  • 共1个答案

    匿名用户

    这(再次)不是R、CRAN或其包的问题…但显然是Conda的问题。在我的系统上,这个依赖很少的小包严格来说没有问题:

    R> install.packages("sparsesvd")
    Installing package into ‘/usr/local/lib/R/site-library’
    (as ‘lib’ is unspecified)
    trying URL 'https://cloud.r-project.org/src/contrib/sparsesvd_0.1-4.tar.gz'
    Content type 'application/x-gzip' length 29729 bytes (29 KB)
    ==================================================
    downloaded 29 KB
    
    * installing *source* package ‘sparsesvd’ ...
    ** package ‘sparsesvd’ successfully unpacked and MD5 sums checked
    ** libs
    gcc -I"/usr/share/R/include" -DNDEBUG      -fpic  -g -O3 -Wall -pipe   -std=gnu99 -march=native -c las2.c -o las2.o
    gcc -I"/usr/share/R/include" -DNDEBUG      -fpic  -g -O3 -Wall -pipe   -std=gnu99 -march=native -c main.c -o main.o
    gcc -I"/usr/share/R/include" -DNDEBUG      -fpic  -g -O3 -Wall -pipe   -std=gnu99 -march=native -c svdlib.c -o svdlib.o
    gcc -I"/usr/share/R/include" -DNDEBUG      -fpic  -g -O3 -Wall -pipe   -std=gnu99 -march=native -c svdutil.c -o svdutil.o
    svdutil.c: In function ‘svd_readBinFloat’:
    svdutil.c:265:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
         y = *((float *) &x);
         ^
    svdutil.c: In function ‘svd_writeBinFloat’:
    svdutil.c:290:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       int y = htonl(*((int *) &r));
       ^~~
    gcc -Wl,-S -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o sparsesvd.so las2.o main.o svdlib.o svdutil.o -L/usr/lib/R/lib -lR
    installing to /usr/local/lib/R/site-library/sparsesvd/libs
    ** R
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded
    * DONE (sparsesvd)
    
    The downloaded source packages are in
        ‘/tmp/RtmpI3TPWj/downloaded_packages’
    R>