我正在尝试在我的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


显然,ExitFailure 1是原始程序的遗留物。

当我运行cabal configure时,我得到了

  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.


任何帮助将不胜感激,并感谢您的阅读。

最佳答案

您必须安装C库,例如libgsl-dev(或-devel)和libgsl本身,但这应由dev包引入。 hmatrix是对C库的绑定,因此您需要安装该库才能安装hmatrix

在我的盒子上,ghc-pkg describe hmatrix列出

extra-libraries: gsl lapack gslcblas


我不确定构建hmatrix实际上是否需要它们,但是同时为dev和BLAS安装lapack软件包(在Ubuntu上可能不是gslcblas)也没有害处。 。

关于haskell - 无法在我的Ubuntu Linux机器上安装hmatrix,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/9541500/

10-13 08:21