无法在我的Ubuntu Linux机器上安装hmatrix

D34*_*7th 2 haskell matrix cabal

我正在尝试在我的Ubuntu Linux机器上安装hmatrix(不知道这是否有必要,但它可能有所帮助)并且无论我做什么它都行不通.

我运行cabal install hmatrix并得到这个:

   Configuring hmatrix-0.13.1.0...
   Checking foreign libraries... FAIL
   *** Sorry, I can't link GSL.
   *** Please make sure that the appropriate -dev packages are installed.
   *** You can also specify the required libraries using
   *** cabal install hmatrix --configure-option=link:lib1,lib2,lib3,etc.
   setup: Package hmatrix-0.13.1.0 can't be built on this system.
   cabal: Error: some packages failed to install:
   hmatrix-0.13.1.0 failed during the building phase. The exception was:
   ExitFailure 1
Run Code Online (Sandbox Code Playgroud)

显然,ExitFailure 1是原始程序的剩余部分.

当我运行cabal配置时,我得到了

  Warning: 'hs-source-dirs: lib' directory does not exist.
  Checking foreign libraries... FAIL
  *** Sorry, I can't link GSL.
  *** Please make sure that the appropriate -dev packages are installed.
  *** You can also specify the required libraries using
  *** cabal install hmatrix --configure-option=link:lib1,lib2,lib3,etc.
Run Code Online (Sandbox Code Playgroud)

任何帮助将不胜感激,谢谢你的阅读.

Dan*_*her 5

您必须安装C库,类似于libgsl-dev(或-devel),以及libgsl它本身,但应该由dev程序包引入.hmatrix是一个绑定到C库,因此您需要安装才能安装hmatrix.

在我的方框中,ghc-pkg describe hmatrix列表

extra-libraries: gsl lapack gslcblas
Run Code Online (Sandbox Code Playgroud)

我不确定它们实际上是否都需要构建hmatrix,但是devlapackBLAS 安装软件包也没有坏处(这可能不是gslcblasUbuntu上的其他内容).


iva*_*n_a 5

在Ubuntu上可以加载一些必需的库 apt-get command.试试这个,

sudo apt-get install libblas-dev libatlas-dev liblapack-dev
Run Code Online (Sandbox Code Playgroud)

  • 看来现在需要的Ubuntu软件包是:sudo apt-get install libgsl0-dev liblapack-dev (2认同)