AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1163685
Accepted
Christopher Kavazos
Christopher Kavazos
Asked: 2019-08-06 16:01:59 +0800 CST2019-08-06 16:01:59 +0800 CST 2019-08-06 16:01:59 +0800 CST

安装带有 lblas 和 lapack 依赖项的 R 包时出现问题

  • 772

我正在尝试将 HMSC R 包安装到 RStudio 版本 1.2.1335 和 R 版本 3.6.1 (2019-07-05) -- Linux Ubuntu 18.04.2 LTS 系统上的“脚趾动作”

通过R安装的代​​码如下

library(devtools)
install_url('https://cran.r-project.org/src/contrib/Archive/BayesLogit/BayesLogit_0.6.tar.gz')
install_github("hmsc-r/HMSC", build_opts = c("--no-resave-data", "--no-manual"))

安装 BayesLogit_0.6.tar.gz 时出现以下错误

/home/barefootbushman/miniconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lblas
/home/barefootbushman/miniconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -llapack
collect2: error: ld returned 1 exit status
/usr/share/R/share/make/shlib.mk:6: recipe for target 'BayesLogit.so' failed
make: *** [BayesLogit.so] Error 1
ERROR: compilation failed for package ‘BayesLogit’
* removing ‘/home/barefootbushman/R/x86_64-pc-linux-gnu-library/3.6/BayesLogit’
Error in i.p(...) : 
  (converted from warning) installation of package ‘/tmp/RtmpL8qXxH/file18aa17542138/BayesLogit_0.6.tar.gz’ had non-zero exit status

我已经检查了 -lblas 和 -lapack 的安装使用

sudo apt-get update

Hit:1 http://nz.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://nz.archive.ubuntu.com/ubuntu bionic-updates InRelease                                             
Hit:3 http://nz.archive.ubuntu.com/ubuntu bionic-backports InRelease                                           
Hit:4 https://repo.skype.com/deb stable InRelease                                                              
Hit:5 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ InRelease                                    
Get:6 https://desktop-download.mendeley.com/download/apt stable InRelease [2,456 B]                            
Ign:7 http://dl.bintray.com/basespace/BaseMount-DEB saucy InRelease                                            
Ign:8 http://dl.bintray.com/basespace/BaseSpaceFS-DEB saucy InRelease                          
Hit:9 http://security.ubuntu.com/ubuntu bionic-security InRelease                              
Hit:10 http://ppa.launchpad.net/inkscape.dev/stable/ubuntu bionic InRelease
Get:11 http://dl.bintray.com/basespace/BaseMount-DEB saucy Release [1,838 B]                        
Get:12 http://dl.bintray.com/basespace/BaseSpaceFS-DEB saucy Release [1,837 B]                               
Hit:13 http://ppa.launchpad.net/marutter/rrutter/ubuntu bionic InRelease                                     
Fetched 6,131 B in 2s (4,067 B/s)                  
Reading package lists... Done

其次是

sudo apt-get install libblas-dev liblapack-dev

Reading package lists... Done
Building dependency tree       
Reading state information... Done
libblas-dev is already the newest version (3.7.1-4ubuntu1).
liblapack-dev is already the newest version (3.7.1-4ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 28 not upgraded.

但是,尝试在 R 中安装 BayesLogit 时,我仍然遇到相同的错误。

任何有关如何克服此错误的帮助将不胜感激。克里斯

software-installation r 18.04 source-packages
  • 1 1 个回答
  • 996 Views

1 个回答

  • Voted
  1. Best Answer
    karel
    2019-10-05T01:57:09+08:002019-10-05T01:57:09+08:00

    要在所有当前支持的 Ubuntu 版本中安装 HMISC R 包,请打开终端并键入:

    sudo apt install r-cran-hmisc  
    

    r-cran-hmisc 软件包不依赖于 libblas-dev 或 liblapack-dev,因此在尝试安装 r-cran-hmisc 时不会收到错误消息cannot find -lblas。 cannot find -llapack

    您在尝试安装 HMISC R 软件包时收到的错误消息肯定是 Anaconda 的错,但我不知道罪魁祸首 Anaconda 文件在您的系统中的位置。通常当路径被 Anaconda 阻塞时,您可以将其符号链接回适当的 Ubuntu 可执行文件。如果 Anaconda 在您的系统中弄乱了太多路径,那么摆脱混乱的唯一方法就是完全卸载并清除 Anaconda。

    • 0

相关问题

  • 如何在没有 root 访问权限的情况下安装软件包?

  • 设置 LAMP 堆栈的最简单方法是什么?

  • 我应该在哪里安装 sagemath?

  • How do I install Adobe Flash player?对于 11.10 及更高版本明确修复 11.10 上的 64 位 Flash

  • 如何设置软件中心为非 root 用户安装软件?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve