我对Haskell很陌生,刚刚安装了GHC、Cabal和我新安装的Arch Linux的所有依赖项。我试着运行$ cabal run,但是我总是遇到这样的错误:
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添加到构建依赖项中。我尝试手动安装软件包ByteArray和hashable,但仍然无法工作。当我运行$ ghc-pkg check时,我会收到所有这些警告:
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和阴谋安装,也什么也不起作用。
https://stackoverflow.com/questions/71370866
复制相似问题