首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >新的密室安装会产生错误

新的密室安装会产生错误
EN

Stack Overflow用户
提问于 2022-03-06 13:52:02
回答 1查看 164关注 0票数 0

我对Haskell很陌生,刚刚安装了GHC、Cabal和我新安装的Arch Linux的所有依赖项。我试着运行$ cabal run,但是我总是遇到这样的错误:

代码语言:javascript
复制
Resolving dependencies...
Build profile: -w ghc-9.0.2 -O1
In order, the following will be built (use -v for more details):
 - password-types-1.0.0.0 (lib:password-types) (requires build)
 - text-short-0.1.5 (lib) (requires build)
 - base64-0.4.2.3 (lib) (requires build)
 - password-3.0.0.0 (lib:password) (requires build)
 - PasswordManager-0.2.0.0 (exe:PasswordManager) (first run)
Starting     password-types-1.0.0.0 (all, legacy fallback)
Starting     text-short-0.1.5 (lib)
Building     text-short-0.1.5 (lib)
Building     password-types-1.0.0.0 (all, legacy fallback)

Failed to build password-types-1.0.0.0.
Build log (
/root/.cabal/logs/ghc-9.0.2/password-types-1.0.0.0-b6ad46c3a2a5c46e5a3feb8166bef298a0c1c24aaa421ab87c68c474481242d7.log
):
[1 of 1] Compiling Main             ( /home/anonymous/Coding/PasswordManager/dist-newstyle/tmp/src-220869/password-types-1.0.0.0/dist/setup/setup.hs, /home/anonymous/Coding/PasswordManager/dist-newstyle/tmp/src-220869/password-types-1.0.0.0/dist/setup/Main.o )
Linking /home/anonymous/Coding/PasswordManager/dist-newstyle/tmp/src-220869/password-types-1.0.0.0/dist/setup/setup ...
Configuring password-types-1.0.0.0...
Preprocessing library for password-types-1.0.0.0..
Building library for password-types-1.0.0.0..
[1 of 2] Compiling Data.Password.Types ( src/Data/Password/Types.hs, dist/build/Data/Password/Types.o, dist/build/Data/Password/Types.dyn_o )

src/Data/Password/Types.hs:53:1: error:
    Could not find module ‘Data.ByteArray’
    There are files missing in the ‘memory-0.16.0’ package,
    try running 'ghc-pkg check'.
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
53 | import Data.ByteArray (constEq)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Failed to build text-short-0.1.5.
Build log (
/root/.cabal/logs/ghc-9.0.2/text-short-0.1.5-acb1ce3e536dccc589b85edcd09cd042b082277864b4c8b1812554d67c66f493.log
):
Configuring library for text-short-0.1.5..
Preprocessing library for text-short-0.1.5..
Building library for text-short-0.1.5..
[1 of 5] Compiling PrimOps          ( src-ghc804/PrimOps.hs, dist/build/PrimOps.o, dist/build/PrimOps.dyn_o )
[2 of 5] Compiling Data.Text.Short.Internal ( src/Data/Text/Short/Internal.hs, dist/build/Data/Text/Short/Internal.o, dist/build/Data/Text/Short/Internal.dyn_o )

src/Data/Text/Short/Internal.hs:122:1: error:
    Could not find module ‘Data.Hashable’
    There are files missing in the ‘hashable-1.4.0.0’ package,
    try running 'ghc-pkg check'.
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
    |
122 | import           Data.Hashable                  (Hashable)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Failed to build password-types-1.0.0.0 (which is required by
exe:PasswordManager from PasswordManager-0.2.0.0). See the build log above for
details.
Failed to build text-short-0.1.5 (which is required by exe:PasswordManager
from PasswordManager-0.2.0.0). See the build log above for details.

我只将包password添加到构建依赖项中。我尝试手动安装软件包ByteArrayhashable,但仍然无法工作。当我运行$ ghc-pkg check时,我会收到所有这些警告:

代码语言:javascript
复制
Warning: haddock-interfaces: /usr/share/doc/haskell-zlib/html/zlib.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-zlib/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-th-compat/html/th-compat.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-th-compat/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-tar/html/tar.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-tar/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-splitmix/html/splitmix.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-splitmix/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-resolv/html/resolv.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-resolv/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-regex-posix/html/regex-posix.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-regex-posix/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-regex-base/html/regex-base.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-regex-base/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-random/html/random.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-random/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-network/html/network.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-network/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-network-uri/html/network-uri.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-network-uri/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-lukko/html/lukko.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-lukko/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-http/html/HTTP.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-http/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-hashable/html/hashable.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-hashable/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-hackage-security/html/hackage-security.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-hackage-security/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-ghc-bignum-orphans/html/ghc-bignum-orphans.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-ghc-bignum-orphans/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-edit-distance/html/edit-distance.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-edit-distance/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-ed25519/html/ed25519.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-ed25519/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-echo/html/echo.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-echo/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-cryptohash-sha256/html/cryptohash-sha256.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-cryptohash-sha256/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-base64-bytestring/html/base64-bytestring.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-base64-bytestring/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-base16-bytestring/html/base16-bytestring.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-base16-bytestring/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-base-orphans/html/base-orphans.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-base-orphans/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-async/html/async.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-async/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/share/doc/haskell-haddock-library/html/haddock-library.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/share/doc/haskell-haddock-library/html doesn't exist or isn't a directory

我不知道这一切意味着什么,也不知道为什么即使这是一个全新的Linux、Haskell和阴谋安装,也什么也不起作用。

EN

回答 1

Stack Overflow用户

发布于 2022-03-06 15:18:19

用于Haskell相关事务的Arch包不起作用。见拱形维基

自版本8.0.2-1以来,Arch ghc包和社区中的所有haskell-*包只提供动态链接的库。因此,要成功链接,必须为动态链接配置GHC、Cabal和Stack,因为默认情况是使用静态链接。

我建议卸载它们并使用黑杯来获得正常的Haskell体验。但是您也可以按照Arch Wiki页面上的进一步说明进行操作。

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71370866

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档