最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

ubuntu - Error in installing packages for R, "Error: package or namespace load failed for ‘RJSONIO’ in dyn.load(file, D

programmeradmin3浏览0评论

I am trying to batch download files from a figshare collection with around 70 files. I want to do this with the "rfigshare" package in R. However when I try to install the package in RStudio, I have repeatedly not been able to install one of the dependencies, "RJSONIO".

This is the error message I receive every time I try to install this dependency:

Error: package or namespace load failed for ‘RJSONIO’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/username/R/x86_64-pc-linux-gnu-library/4.4/00LOCK-RJSONIO/00new/RJSONIO/libs/RJSONIO.so':
  /home/username/R/x86_64-pc-linux-gnu-library/4.4/00LOCK-RJSONIO/00new/RJSONIO/libs/RJSONIO.so: undefined symbol: VECTOR_PTR_RO
Error: loading failed
Execution halted

Also earlier in the console during the installation procedure there is a section which says:

RJSON.c: In function ‘R_readFromJSON’:
RJSON.c:73:28: warning: implicit declaration of function ‘VECTOR_PTR_RO’; did you mean ‘VECTOR_PTR’? [-Wimplicit-function-declaration]
   73 |             ptr = (void *) VECTOR_PTR_RO(tmp);
      |                            ^~~~~~~~~~~~~
      |                            VECTOR_PTR
RJSON.c:73:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   73 |             ptr = (void *) VECTOR_PTR_RO(tmp);
      |          

I have tried numerous other suggestions that were posted previously online, and have also tried to install the package on a fresh install of R. However none of those have worked.

    OS: Ubuntu 22.04

    R Version: 4.4.3

    RStudio Version: 2024.12.1

Will provide more information as required.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论