cabal沙箱安装仍然失败,“包很可能被重新安装破坏” [英] cabal sandbox install still fails with "packages are likely to be broken by the reinstalls"

查看:151
本文介绍了cabal沙箱安装仍然失败,“包很可能被重新安装破坏”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用cabal沙盒构建 Elm Platform 。然而,安装失败,并显示消息软件包很可能被重新安装破坏。这在我看来与沙箱的全部目的相矛盾,我相信这是为了避免这种错误。



有人可以为我解释这个错误,甚至是更好地帮助我继续安装Elm?是否可以安全地添加 - force-reinstalls



以下是我执行的命令序列: p>

  cabal sandbox init 
cabal update
cabal install -j elm-compiler-0.14 elm-package-0.2 elm -make-0.1 elm-reactor-0.2 elm-repl-0.4

我使用cabal 1.22。 0.0和GHC 7.8.2在Mac OS 10.10上。完整的输出如下:

 解决依赖关系... 
为了安装以下内容:
Diff-0.3.0(新包)
HUnit-1.2.5.2(新包)
ansi-terminal-0.6.2.1(新包)
ansi-wl-pprint-0.6 .7.1(新包)
async-2.0.2(新包)
blaze-markup-0.6.2.0(新包)
blaze-html-0.7.0.3(新包)
byteable-0.1.1(新包)
bytestring-mmap-0.2.2(新包)
bytestring-trie-0.2.4(新包)
谷类-0.4。 1.1(新包)
cmdargs-0.10.12(新包)
concatenative-1.0.1(新包)
cookie-0.4.1.4(新包)
cryptohash- 0.11.6(新包)
enumerator-0.4.20(新包)
attoparsec-enumerator-0.3.3(新包)
blaze-builder-enumerator-0.2.0.6(新包)
例外-0.6.1(重新安装)更改:mtl-2.1.3.1 - > 2.2.1,
变形金刚 - 0.3.0.0 - > 0.4.1.0
可扩展异常-0.1.1.4(新包)
hfsevents-0.1.5(新包)
fsnotify-0.1.0.3(新包)
沙漏 - 0.2.8(新包)
asn1-types-0.3.0(新包)
asn1-encoding-0.9.0(新包)
asn1-parse-0.9.0(新包)
crypto-pubkey-types-0.4.2.3(新包)
http-types-0.8.5(新包)
mime-types-0.1.0.5(新包)
monads-tf-0.1.0.2(重新安装)更改:变形金刚-0.3.0.0 - > 0.4.1.0
MonadCatchIO-transformers-0.3.1.3(新包)
network-2.6.0.2(新版本)
parsec-3.1.7(新版本)
indents- 0.3.3(新软件包)
network-uri-2.6.0.1(新软件包)
HTTP-4000.2.19(新版本)
pem-0.2.2(新软件包)
美元类1.0.0.0(新包)
language-glsl-0.1.1(新包)
publicsuffixlist-0.1(新包)
regex-base-0.93.2(new
regex-posix-0.95.2(新包)
securemem-0.1.4(新包)
crypto-cipher-types-0.0.9(新包)
cipher-aes-0.2.9(新包)
cipher-des-0.0.6(新包)
cipher-rc4-0.1.4(新包)
crypto-random- 0.0.8(新包)
cprng-aes-0.6.1(新包)
crypto-numbers-0.2.7(新包)
crypto-pubkey-0.2.7(新包)
socks-0.5.4(新包)
streaming-commons-0.1.8(新包)
http-client-0.3.8.2(最新版:0.4.6.2)(new包)
syb-0.4.4(新包)
tagshare-0.0(新包)
终端fo-0.4.0.0(新包)
haskeline-0.7.1.3(新包)
tf-random-0.5(新包)
QuickCheck-2.7.6(新包)
testing-feat-0.4.0.2(新软件包)
变压器-compat-0.3.3.4(新软件包)
optparse-applicative-0.10.0(最新版本:0.11.0.1)(新软件包)
union-find-0.2(新包)
unix-compat-0.4.1.4(新包)
unordered-containers-0.2.5.1(新包)
aeson-0.8 .0.2 + old-locale(新包)
aeson-pretty-0.7.2(新包)
uniplate-1.6.12(新包)
websockets-0.9.2.2 )
wl-pprint-1.1(新包)
语言ecmascript-0.16.2(最新:0.17)(新包)
elm-compiler-0.14(新包)
x509-1.5.0.1(新包)
x509-store-1.5.0(新包)
x509-system-1.5.0(新包)
x509-validation-1.5。 1(新包)
tls-1.2.13(新包)
连接-0.2.3(新包)
http-client-tls-0.2.2(新包)
zip-archive-0.2.3.5(新版本)
elm-package -0.2(最新:0.2.2)(新包)
elm-make-0.1(新包)
elm-repl-0.4(新包)
zlib-enum-0.2.3.1 (新包)
snap-core-0.9.6.4(新包)
snap-server-0.9.4.6(新包)
websockets-snap-0.9.0.0(新包)
elm-reactor-0.2(最新版本:0.2.0.1)(新包装)
cabal:下列软件包可能会因重新安装而中断:
temporary-1.2.0.3
shellmate-0.1.6
如果您想要安装,请使用--force-reinstalls。

更新:

根据要求,输出从 cabal exec ghc-pkg列表临时

  $ cabal exec ghc-pkg list temporary 
/Applications/ghc-7.8.2.app/Contents/lib/ghc-7.8.2/package.conf.d
temporary-1.2.0.3
/ Users /nbartlett/Development/Elm-Platform/tmp/.cabal-sandbox/x86_64-osx-ghc-7.8.2-packages.conf.d

$您已经安装了 shellmate 临时

解决方案 (可能还有其他一些软件包 - 尤其是这些软件包的依赖关系)放入您的全局包数据库中,这些数据库在沙箱中也是可见的。错误是这样说的:


  1. 您即将安装已安装的软件包的新版本(称为A-2)调用现有的A-1)和
  2. ,你将重新安装一个包的一个现有版本(称之为B),该包将其依赖关系中的一个从A-1更新为A- 2和

  3. 新的B将会影响旧的B,并且
  4. 有一个依赖于B的包(称为C)。
  5. / li>

所有这一切的结果是,在重新安装B之后C可能会被破坏,因为它会链接到B,期待它拖动在A-1中,但A-2将代替药物。在你的特定情况下, shellmate 临时都扮演着C角色,并且每个角色至少有一个of exceptions-0.6.1 monads-tf-0.1.0.2 扮演 B



您有很多选择;对我最有吸引力的是:<​​b>


  1. 删除 shellmate 临时从您的全局包数据库。这些将不再可用,但这种方式肯定可以防止很多问题。

      ghc-pkg unregister --global shellmate 
    ghc-pkg unregister --global temporary


  2. 重新安装 shellmate 临时更新依赖关系。这可能会也可能不起作用。

      cabal install --reinstall --global shellmate-0.1.6 temporary-1.2.0.3 mtl -2.2.1变形金刚-0.4.1.0 


  3. 忽略警告并强制重新安装。很可能在沙盒内 shellmate 临时将无法使用。

      cabal install elm --force-reinstalls#from the sandbox 


  4. 将elm,shellmate和temporary都安装到沙箱中。这可能仍然会给你警告,但它们可能会被安全忽略:在沙箱内,你希望使用沙箱版本(因此破碎的全局包无关紧要),并且在沙箱外包含全局包不会被破坏。

      cabal install elm临时shellmate#可能带--force-reinstalls 



I'm trying to build the Elm Platform using a cabal sandbox. The installation fails however with the message "packages are likely to be broken by the reinstalls". This seems to me to contradict the whole purpose of sandboxing, which I had believed was supposed to avoid this kind of error.

Can anybody explain this error for me, and even better help me proceed with the Elm install? Is it safe to add --force-reinstalls?

Here are the sequence of commands I executed:

cabal sandbox init
cabal update
cabal install -j elm-compiler-0.14 elm-package-0.2 elm-make-0.1 elm-reactor-0.2 elm-repl-0.4

I'm using cabal 1.22.0.0 and GHC 7.8.2 on Mac OS 10.10. The full output as follows:

Resolving dependencies...
In order, the following would be installed:
Diff-0.3.0 (new package)
HUnit-1.2.5.2 (new package)
ansi-terminal-0.6.2.1 (new package)
ansi-wl-pprint-0.6.7.1 (new package)
async-2.0.2 (new package)
blaze-markup-0.6.2.0 (new package)
blaze-html-0.7.0.3 (new package)
byteable-0.1.1 (new package)
bytestring-mmap-0.2.2 (new package)
bytestring-trie-0.2.4 (new package)
cereal-0.4.1.1 (new package)
cmdargs-0.10.12 (new package)
concatenative-1.0.1 (new package)
cookie-0.4.1.4 (new package)
cryptohash-0.11.6 (new package)
enumerator-0.4.20 (new package)
attoparsec-enumerator-0.3.3 (new package)
blaze-builder-enumerator-0.2.0.6 (new package)
exceptions-0.6.1 (reinstall) changes: mtl-2.1.3.1 -> 2.2.1,
transformers-0.3.0.0 -> 0.4.1.0
extensible-exceptions-0.1.1.4 (new package)
hfsevents-0.1.5 (new package)
fsnotify-0.1.0.3 (new package)
hourglass-0.2.8 (new package)
asn1-types-0.3.0 (new package)
asn1-encoding-0.9.0 (new package)
asn1-parse-0.9.0 (new package)
crypto-pubkey-types-0.4.2.3 (new package)
http-types-0.8.5 (new package)
mime-types-0.1.0.5 (new package)
monads-tf-0.1.0.2 (reinstall) changes: transformers-0.3.0.0 -> 0.4.1.0
MonadCatchIO-transformers-0.3.1.3 (new package)
network-2.6.0.2 (new version)
parsec-3.1.7 (new version)
indents-0.3.3 (new package)
network-uri-2.6.0.1 (new package)
HTTP-4000.2.19 (new version)
pem-0.2.2 (new package)
prettyclass-1.0.0.0 (new package)
language-glsl-0.1.1 (new package)
publicsuffixlist-0.1 (new package)
regex-base-0.93.2 (new package)
regex-posix-0.95.2 (new package)
securemem-0.1.4 (new package)
crypto-cipher-types-0.0.9 (new package)
cipher-aes-0.2.9 (new package)
cipher-des-0.0.6 (new package)
cipher-rc4-0.1.4 (new package)
crypto-random-0.0.8 (new package)
cprng-aes-0.6.1 (new package)
crypto-numbers-0.2.7 (new package)
crypto-pubkey-0.2.7 (new package)
socks-0.5.4 (new package)
streaming-commons-0.1.8 (new package)
http-client-0.3.8.2 (latest: 0.4.6.2) (new package)
syb-0.4.4 (new package)
tagshare-0.0 (new package)
terminfo-0.4.0.0 (new package)
haskeline-0.7.1.3 (new package)
tf-random-0.5 (new package)
QuickCheck-2.7.6 (new package)
testing-feat-0.4.0.2 (new package)
transformers-compat-0.3.3.4 (new package)
optparse-applicative-0.10.0 (latest: 0.11.0.1) (new package)
union-find-0.2 (new package)
unix-compat-0.4.1.4 (new package)
unordered-containers-0.2.5.1 (new package)
aeson-0.8.0.2 +old-locale (new package)
aeson-pretty-0.7.2 (new package)
uniplate-1.6.12 (new package)
websockets-0.9.2.2 (new version)
wl-pprint-1.1 (new package)
language-ecmascript-0.16.2 (latest: 0.17) (new package)
elm-compiler-0.14 (new package)
x509-1.5.0.1 (new package)
x509-store-1.5.0 (new package)
x509-system-1.5.0 (new package)
x509-validation-1.5.1 (new package)
tls-1.2.13 (new package)
connection-0.2.3 (new package)
http-client-tls-0.2.2 (new package)
zip-archive-0.2.3.5 (new version)
elm-package-0.2 (latest: 0.2.2) (new package)
elm-make-0.1 (new package)
elm-repl-0.4 (new package)
zlib-enum-0.2.3.1 (new package)
snap-core-0.9.6.4 (new package)
snap-server-0.9.4.6 (new package)
websockets-snap-0.9.0.0 (new package)
elm-reactor-0.2 (latest: 0.2.0.1) (new package)
cabal: The following packages are likely to be broken by the reinstalls:
temporary-1.2.0.3
shellmate-0.1.6
Use --force-reinstalls if you want to install anyway.

UPDATE:

As requested, the output from cabal exec ghc-pkg list temporary:

$ cabal exec ghc-pkg list temporary
/Applications/ghc-7.8.2.app/Contents/lib/ghc-7.8.2/package.conf.d
   temporary-1.2.0.3
/Users/nbartlett/Development/Elm-Platform/tmp/.cabal-sandbox/x86_64-osx-ghc-7.8.2-packages.conf.d

解决方案

You have installed shellmate and temporary (and potentially a few other packages -- especially dependencies of these) into your global package database, which is also visible from within sandboxes. The error is saying that:

  1. You are about to install a new version (call it A-2) of a package that's already installed (call the existing one A-1), and
  2. you are about to reinstall an existing version (call it B) of a package that updates one of its dependencies from A-1 to A-2, and
  3. the new B will shadow the old B, and
  4. there is a package (call it C) which depends on B.

The upshot of all this is that C will probably be broken after the reinstallation of B, since it will link to B expecting this to drag in A-1, but A-2 will be drug in instead. In your particular case, both shellmate and temporary are playing the role of C, and for each of them at least one of exceptions-0.6.1 or monads-tf-0.1.0.2 is playing the role of B.

You have many choices; the most attractive to me are:

  1. Remove shellmate and temporary from your global package database. These will no longer be available, but this way is certain to prevent a lot of problems.

    ghc-pkg unregister --global shellmate
    ghc-pkg unregister --global temporary
    

  2. Reinstall shellmate and temporary in your global package database with updated dependencies. This may or may not work.

    cabal install --reinstall --global shellmate-0.1.6 temporary-1.2.0.3 mtl-2.2.1 transformers-0.4.1.0
    

  3. Ignore the warnings and force reinstalls. It is likely that shellmate and temporary will be unusable from within the sandbox.

    cabal install elm --force-reinstalls # from within the sandbox
    

  4. Install elm, shellmate, and temporary all into the sandbox. It is possible that this will still give you warnings, but they may safely be ignored: within the sandbox, you expect to use the sandbox versions (hence the "broken" global packages won't matter), and outside the sandbox the global packages will not be broken.

    cabal install elm temporary shellmate # possibly with --force-reinstalls
    

这篇关于cabal沙箱安装仍然失败,“包很可能被重新安装破坏”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆