无法从 OpenSUSE Leap 15.2 安装 arm 和 lme4 软件包

如何解决无法从 OpenSUSE Leap 15.2 安装 arm 和 lme4 软件包

我使用的是 OpenSUSE Leap 15.2 操作系统和预装的 R v3.5.0。除了 rstudio 外,我不需要安装任何软件包。

以下是安装详情:

> sessionInfo()

R version 3.5.0 (2018-04-23)
Platform: x86_64-suse-linux-gnu (64-bit)
Running under: openSUSE Leap 15.2

Matrix products: default
BLAS: /usr/lib64/R/lib/libRblas.so
LAPACK: /usr/lib64/R/lib/libRlapack.so

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

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.5.0

我在安装分析所需的两个软件包时遇到困难:armlme4。我安装了我还需要的 ggplot2 软件包,没有任何问题。

无论是从 RStudio 图形界面还是从 R 命令行(在终端内),我都会收到大量我无法解释的错误...

我在法国尝试过各种 repos,遇到同样的问题。请注意,这两个软件包的安装在 Windows 10 操作系统上运行良好。

安装输出以:

ERROR: compilation failed for package ‘RcppEigen’
* removing ‘/home/thomas/R/x86_64-suse-linux-gnu-library/3.5/RcppEigen’
Warning in install.packages :
  installation of package ‘RcppEigen’ had non-zero exit status
ERROR: dependency ‘latticeExtra’ is not available for package ‘Hmisc’
* removing ‘/home/thomas/R/x86_64-suse-linux-gnu-library/3.5/Hmisc’
Warning in install.packages :
  installation of package ‘Hmisc’ had non-zero exit status
ERROR: dependencies ‘minqa’,‘nloptr’,‘statmod’,‘RcppEigen’ are not available for package ‘lme4’
* removing ‘/home/thomas/R/x86_64-suse-linux-gnu-library/3.5/lme4’
Warning in install.packages :
  installation of package ‘lme4’ had non-zero exit status
ERROR: dependencies ‘lme4’,‘Hmisc’ are not available for package ‘arm’
* removing ‘/home/thomas/R/x86_64-suse-linux-gnu-library/3.5/arm’
Warning in install.packages :
  installation of package ‘arm’ had non-zero exit status

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

我确实观察到了大量关于 Eigen 内容的错误行,如下所示:

../inst/include/Eigen/src/Core/CoreEvaluators.h:665:8:   required from ‘struct Eigen::internal::evaluator<Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,const Eigen::Transpose<const Eigen::Block<const Eigen::Matrix<double,-1,-1>,1,false> >,const Eigen::Block<const Eigen::Transpose<const Eigen::Matrix<double,-1> >,false> > >’
../inst/include/Eigen/src/Core/Redux.h:349:39:   required from ‘class Eigen::internal::redux_evaluator<Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,false> > >’
../inst/include/Eigen/src/Core/Redux.h:416:17:   required from ‘typename Eigen::internal::traits<T>::Scalar Eigen::DenseBase<Derived>::redux(const Func&) const [with BinaryOp = Eigen::internal::scalar_sum_op<double,double>; Derived = Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,false> >; typename Eigen::internal::traits<T>::Scalar = double]’

我找不到如何在文件中导出完整的安装输出,所以我不能在这里提供更多细节...

非常感谢您的帮助和建议!

托马斯

-- 编辑 --

完成我的问题:

  1. 我在虚拟机上安装了一个 Ubuntu Focal Fossa (21)(通过 VirtualBox)并且安装包没有任何问题......

  2. 我尝试安装小的依赖包 minqa 并得到以下输出:

enter image description here

我可以看到其他错误消息,例如 make: gfortran: command not found,这可能有帮助....

-- 编辑 --

我设法导出了 arm 软件包安装尝试的输出。请注意,这是从 R 版本 4.1.0 开始的,我也安装在我的 OpenSUSE 系统上(见评论):

thomas@localhost:~> sudo R

R version 4.1.0 (2021-05-18) -- "Camp Pontanezen"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-suse-linux-gnu (64-bit)

R est un logiciel libre livré sans AUCUNE GARANTIE.
Vous pouvez le redistribuer sous certaines conditions.
Tapez 'license()' ou 'licence()' pour plus de détails.

R est un projet collaboratif avec de nombreux contributeurs.
Tapez 'contributors()' pour plus d'information et
'citation()' pour la façon de le citer dans les publications.

Tapez 'demo()' pour des démonstrations,'help()' pour l'aide
en ligne ou 'help.start()' pour obtenir l'aide au format HTML.
Tapez 'q()' pour quitter R.

> install.packages(pkgs="arm",repos="http://cran.univ-lyon1.fr/")

installation des dépendances ‘jpeg’,‘latticeExtra’,‘lme4’,‘Hmisc’

essai de l'URL 'http://cran.univ-lyon1.fr/src/contrib/jpeg_0.1-8.1.tar.gz'
Content type 'application/x-gzip' length 18116 bytes (17 KB)
==================================================
downloaded 17 KB

essai de l'URL 'http://cran.univ-lyon1.fr/src/contrib/latticeExtra_0.6-29.tar.gz'
Content type 'application/x-gzip' length 1292315 bytes (1.2 MB)
==================================================
downloaded 1.2 MB

essai de l'URL 'http://cran.univ-lyon1.fr/src/contrib/lme4_1.1-27.tar.gz'
Content type 'application/x-gzip' length 3302287 bytes (3.1 MB)
==================================================
downloaded 3.1 MB

essai de l'URL 'http://cran.univ-lyon1.fr/src/contrib/Hmisc_4.5-0.tar.gz'
Content type 'application/x-gzip' length 775444 bytes (757 KB)
==================================================
downloaded 757 KB

essai de l'URL 'http://cran.univ-lyon1.fr/src/contrib/arm_1.11-2.tar.gz'
Content type 'application/x-gzip' length 79464 bytes (77 KB)
==================================================
downloaded 77 KB

* installing *source* package ‘jpeg’ ...
** package ‘jpeg’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"/usr/lib64/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection  -c read.c -o read.o
In file included from read.c:1:0:
rjcommon.h:11:10: fatal error: jpeglib.h: Aucun fichier ou dossier de ce type
 #include <jpeglib.h>
          ^~~~~~~~~~~
compilation terminated.
make: *** [/usr/lib64/R/etc/Makeconf:168: read.o] Error 1
ERROR: compilation failed for package ‘jpeg’
* removing ‘/usr/lib64/R/library/jpeg’
* installing *source* package ‘lme4’ ...
** package ‘lme4’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++14 -I"/usr/lib64/R/include" -DNDEBUG  -I'/usr/lib64/R/library/Rcpp/include' -I'/usr/lib64/R/library/RcppEigen/include' -I/usr/local/include  -DNDEBUG -DEIGEN_DONT_VECTORIZE -fpic  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection  -c external.cpp -o external.o
g++ -std=gnu++14 -I"/usr/lib64/R/include" -DNDEBUG  -I'/usr/lib64/R/library/Rcpp/include' -I'/usr/lib64/R/library/RcppEigen/include' -I/usr/local/include  -DNDEBUG -DEIGEN_DONT_VECTORIZE -fpic  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection  -c glmFamily.cpp -o glmFamily.o
g++ -std=gnu++14 -I"/usr/lib64/R/include" -DNDEBUG  -I'/usr/lib64/R/library/Rcpp/include' -I'/usr/lib64/R/library/RcppEigen/include' -I/usr/local/include  -DNDEBUG -DEIGEN_DONT_VECTORIZE -fpic  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection  -c optimizer.cpp -o optimizer.o
g++ -std=gnu++14 -I"/usr/lib64/R/include" -DNDEBUG  -I'/usr/lib64/R/library/Rcpp/include' -I'/usr/lib64/R/library/RcppEigen/include' -I/usr/local/include  -DNDEBUG -DEIGEN_DONT_VECTORIZE -fpic  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection  -c predModule.cpp -o predModule.o
g++ -std=gnu++14 -I"/usr/lib64/R/include" -DNDEBUG  -I'/usr/lib64/R/library/Rcpp/include' -I'/usr/lib64/R/library/RcppEigen/include' -I/usr/local/include  -DNDEBUG -DEIGEN_DONT_VECTORIZE -fpic  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection  -c respModule.cpp -o respModule.o
Erreur : le package ‘Rcpp’ a été installé avant R 4.0.0 : veuillez le réinstaller,s'il-vous-plait
Exécution arrêtée
g++ -std=gnu++14 -shared -L/usr/lib64/R/lib -L/usr/local/lib64 -o lme4.so external.o glmFamily.o optimizer.o predModule.o respModule.o -L/usr/lib64/R/lib -lR
Erreur : le package ‘Rcpp’ a été installé avant R 4.0.0 : veuillez le réinstaller,s'il-vous-plait
Exécution arrêtée
installing to /usr/lib64/R/library/00LOCK-lme4/00new/lme4/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error: le chargement du package ou de l'espace de noms a échoué pour ‘Matrix’ :
le package ‘Matrix’ a été installé avant R 4.0.0 : veuillez le réinstaller,s'il-vous-plait
Erreur : le package ‘Matrix’ ne peut être chargé
Exécution arrêtée
ERROR: lazy loading failed for package ‘lme4’
* removing ‘/usr/lib64/R/library/lme4’
ERROR: dependency ‘jpeg’ is not available for package ‘latticeExtra’
* removing ‘/usr/lib64/R/library/latticeExtra’
ERROR: dependency ‘latticeExtra’ is not available for package ‘Hmisc’
* removing ‘/usr/lib64/R/library/Hmisc’
ERROR: dependencies ‘lme4’,‘Hmisc’ are not available for package ‘arm’
* removing ‘/usr/lib64/R/library/arm’

The downloaded source packages are in
    ‘/tmp/Rtmpz1IryW/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Messages d'avis :
1: Dans install.packages(pkgs = "arm",repos = "http://cran.univ-lyon1.fr/") :
  installation of package ‘jpeg’ had non-zero exit status
2: Dans install.packages(pkgs = "arm",repos = "http://cran.univ-lyon1.fr/") :
  installation of package ‘lme4’ had non-zero exit status
3: Dans install.packages(pkgs = "arm",repos = "http://cran.univ-lyon1.fr/") :
  installation of package ‘latticeExtra’ had non-zero exit status
4: Dans install.packages(pkgs = "arm",repos = "http://cran.univ-lyon1.fr/") :
  installation of package ‘Hmisc’ had non-zero exit status
5: Dans install.packages(pkgs = "arm",repos = "http://cran.univ-lyon1.fr/") :
  installation of package ‘arm’ had non-zero exit status

解决方法

根据我的经验,Unix 上的这些错误通常源于缺少外部库。例如,安装 R xml2 软件包需要通过系统软件包管理器(即 R 外部)安装 libxml2-dev,否则安装将失败。

我看不懂法语,但在我看来好像依赖项 jpeg 失败了,因为缺少外部 jpeg 库,然后一切都从那里级联。您可以尝试安装某些版本的 libjpeg 库。我知道它预装在 Ubuntu 中,这可能是它对你有用的原因。我有点惊讶它没有安装在 OpenSUSE 中,但我没有使用 OpenSUSE 的经验。

,

来自 lme4 包页面:

The core computational algorithms are implemented using the 'Eigen' C++ library for numerical linear algebra and 'RcppEigen' "glue".

https://cran.r-project.org/web/packages/lme4/index.html

我猜你必须安装 Eigen c++ 库,你可以找到方法 here。这更有可能是因为 rcppeigen 无法安装。我会安装 Eigen,然后安装 rcppeigen 和胶水,然后尝试安装您收到错误的其他软件包。

,

答案/评论中有很多很好的建议,但即使遵循了所有建议,我还是遇到了更多问题。

以下是我在 OpenSuse Leap 15.2 VM (https://www.osboxes.org/opensuse/) 上成功安装 lme4 和 arm for R v3.5.0 的步骤:

  • 下载并安装 R (v3.5.0) 和所需的编译相关软件
sudo zypper install R-core
sudo zypper install R-base
sudo zypper install gcc
sudo zypper install gcc-c++
sudo zypper install gfortran
sudo zypper install ed
sudo zypper install libtool
sudo zypper install nlopt-devel
install.packages("~Downloads/latticeExtra_0.6-26.tar.gz",repos = NULL)
install.packages("nloptr")
install.packages("Hmisc")
install.packages("lme4")
install.packages("arm")
  • 要安装其他所需的软件包,请从 https://cran.r-project.org/src/contrib/Archive/ 中找到与 Rv3.5.0 兼容的存档版本并在本地安装(例如 install.packages("~Downloads/latticeExtra_0.6-26.tar.gz",repos = NULL)

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-