“ nix-env -i stack”在Mac OS X上失败

教规

由于这个问题,有人告诉我应该安装stackcabal-install使用nix,因此我现在尝试haskell-stack使用进行安装nix-env -i

整个错误消息在这里

$ nix-env -i stack
...
lib/machserver.cpp:180:27: note: put the semicolon on a separate line to silence this warning
In file included from lib/alloc.cpp:32:
In file included from ./security_utilities/globalizer.h:31:
In file included from ./security_utilities/threading.h:40:
./security_utilities/threading_internal.h:67:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
#if _HAVE_64BIT_ATOMIC
    ^
./security_utilities/threading_internal.h:41:29: note: expanded from macro '_HAVE_64BIT_ATOMIC'
#define _HAVE_64BIT_ATOMIC (defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
                            ^
./security_utilities/threading_internal.h:67:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
./security_utilities/threading_internal.h:41:51: note: expanded from macro '_HAVE_64BIT_ATOMIC'
#define _HAVE_64BIT_ATOMIC (defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
                                                  ^
./security_utilities/threading_internal.h:67:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
./security_utilities/threading_internal.h:41:72: note: expanded from macro '_HAVE_64BIT_ATOMIC'
#define _HAVE_64BIT_ATOMIC (defined(__ppc64__) || defined(__i386__) || defined(__x86_64__))
                                                                       ^
./security_utilities/threading_internal.h:119:50: warning: while loop has empty body [-Wempty-body]
        { while (!casb(store, value, store)) /* again */; return value; }
                                                        ^
./security_utilities/threading_internal.h:119:50: note: put the semicolon on a separate line to silence this warning
4 warnings generated.
4 warnings generated.
4 warnings generated.
5 warnings generated.
make[2]: *** [/nix/store/204lvxmsigkgkdv2c0fvkqalxmg4fik5-gnustep-make-2.7.0/share/GNUstep/Makefiles/Instance/library.make:278: internal-library-all_] Error 2
make[1]: *** [/nix/store/204lvxmsigkgkdv2c0fvkqalxmg4fik5-gnustep-make-2.7.0/share/GNUstep/Makefiles/Master/rules.make:297: security_utilities.all.library.variables] Error 2
make: *** [/nix/store/204lvxmsigkgkdv2c0fvkqalxmg4fik5-gnustep-make-2.7.0/share/GNUstep/Makefiles/Master/library.make:37: internal-all] Error 2
builder for '/nix/store/xxja1zlr9xqvl4vij85lcf30h5s6yyi5-libsecurity_utilities-osx-10.7.5.drv' failed with exit code 2
cannot build derivation '/nix/store/g2i0xac4g4173561i5lsgn7pncswzmqd-SecurityTool-55115.drv': 1 dependencies couldn't be built
copying path '/nix/store/b5j4s3wmh2bji4ck8wrvizh5knfnw4mw-pem-0.2.4' from 'https://cache.nixos.org'...
cannot build derivation '/nix/store/ss179ilk0x4yb6z1dks3aa9z5b0bzih5-x509-system-1.6.6.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/7f4a2s6ri62dm37md14wxla62hygxg0z-connection-0.2.8.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/lg6k2p3v4sfj6w9kb3bapizzr8qk3i3p-http-client-tls-0.3.5.3.drv': 1 dependencies couldn't be built

cannot build derivation '/nix/store/djqw65b0cnlpdfpadxhnqr344qrwdqa9-stack-1.9.1.drv': 1 dependencies couldn't be built
error: build of '/nix/store/djqw65b0cnlpdfpadxhnqr344qrwdqa9-stack-1.9.1.drv' failed

$ uname -a                                                                                             
Darwin YudeMBP.local 18.2.0 Darwin Kernel Version 18.2.0: Fri Oct  5 19:41:49 PDT 2018; root:xnu-4903.221.2~2/RELEASE_X86_64 x86_64

如何解决这个问题?

罗伯特·亨辛

看来您正在尝试从Nixpkgs版本安装堆栈,且依赖关系已损坏stack

您可以在HowOldIs中查看构建年龄及其状态链接

要更改您要安装的频道,请使用nix-channel命令。

例如:

# add the config
nix-channel --add https://nixos.org/channels/nixpkgs-18.09-darwin nixpkgs
# download the latest nix expressions
nix-channel --update

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章