gpt4 book ai didi

r - 在 Linux 上的 RStudio 中安装包时遇到问题

转载 作者:太空宇宙 更新时间:2023-11-04 10:16:50 25 4
gpt4 key购买 nike

我正在尝试在 Linux 上的 RStudio 中安装以下包。我收到以下错误代码。我真的不明白。我想知道是否有人可以帮助我理解它。

谢谢,尼克

> install.packages("PKI")
Installing package into ‘/home/nick/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/PKI_0.1-3.tar.gz'
Content type 'application/x-gzip' length 31058 bytes (30 KB)
==================================================
downloaded 30 KB

* installing *source* package ‘PKI’ ...
** package ‘PKI’ successfully unpacked and MD5 sums checked
** libs
gcc -I/usr/include/R/ -DNDEBUG -D_FORTIFY_SOURCE=2 -fpic -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -c asn1.c -o asn1.o
gcc -I/usr/include/R/ -DNDEBUG -D_FORTIFY_SOURCE=2 -fpic -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -c init.c -o init.o
gcc -I/usr/include/R/ -DNDEBUG -D_FORTIFY_SOURCE=2 -fpic -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -c pki-x509.c -o pki-x509.o
pki-x509.c: In function ‘PKI_extract_key’:
pki-x509.c:136:26: error: dereferencing pointer to incomplete type ‘EVP_PKEY {aka struct evp_pkey_st}’
if (EVP_PKEY_type(key->type) != EVP_PKEY_RSA)
^~
pki-x509.c: In function ‘get_cipher’:
pki-x509.c:244:40: error: dereferencing pointer to incomplete type ‘EVP_CIPHER_CTX {aka struct evp_cipher_ctx_st}’
ctx = (EVP_CIPHER_CTX*) malloc(sizeof(*ctx));
^~~~
pki-x509.c: In function ‘PKI_RSAkeygen’:
pki-x509.c:550:5: warning: ‘RSA_generate_key’ is deprecated [-Wdeprecated-declarations]
rsa = RSA_generate_key(bits, 65537, 0, 0);
^~~
In file included from /usr/include/openssl/rsa.h:13:0,
from pki.h:13,
from pki-x509.c:1:
/usr/include/openssl/rsa.h:193:1: note: declared here
DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, void
^
make: *** [/usr/lib64/R/etc/Makeconf:159: pki-x509.o] Error 1
ERROR: compilation failed for package ‘PKI’
* removing ‘/home/nick/R/x86_64-pc-linux-gnu-library/3.4/PKI’
Warning in install.packages :
installation of package ‘PKI’ had non-zero exit status

The downloaded source packages are in
‘/tmp/RtmpttDG6C/downloaded_packages’

最佳答案

我想我最近遇到了同样的问题。

我通过从 PKI RForge page 下载最新的 tarball(.tar.gz 文件 PKI_0.1-5.tar.gz)安装了这个包。然后运行

install.packages(<tarball_path>, repos = NULL, type = "source") .

编辑:实际上,运行 install.packages('PKI',,'http://www.rforge.net/') 更容易如 PKI RForge page 底部的小字体所示

EDIT2:查看 news ,看起来版本 0.1-4(可能更稳定)也解决了这个问题,而且,它在我的系统上工作得很好,而 0.1-3 没有(目前在 CRAN 上的那个)。

关于r - 在 Linux 上的 RStudio 中安装包时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45764389/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com