为什么cabal重新安装“始终危险”? [英] Why are cabal reinstalls "always dangerous"?
问题描述
警告:请注意,重新安装通常很危险。无论如何,继续......
这个消息背后的原因是什么?
目前,重新安装软件包意味着破坏性地覆盖已经安装的软件包。如果这个旧软件包对系统有任何反向依赖关系,他们将不再工作。
为了减少这种可能性, cabal-install
会检查它在调用这些反向依赖时访问的包数据库并列出它们。在这种情况下,它需要 - force-reinstalls
才能继续。但即使没有找到任何反向依赖关系,也并不意味着没有任何反向依赖关系。在系统的其他地方可能会有其他软件包数据库(例如,多个用户数据库),或者已针对要覆盖的旧版软件包配置的项目目录。没有办法使 cabal-install
完全确定,这就是为什么它警告重新安装总是很危险。
When reinstalling a package using Cabal, one usually sees this warning:
Warning: Note that reinstalls are always dangerous. Continuing anyway...
What are some of the reasons behind this message?
Currently, reinstalling a package means destructively overwriting an already installed package. If that old package has any reverse dependencies on the system, they'll no longer work.
To make this less likely, cabal-install
checks the package databases it has access to when invoked for such reverse dependencies and lists them. In this situation, it requires --force-reinstalls
to continue. But even if none reverse dependencies can be found, it does not mean there are none. It's possible there are additional package databases elsewhere on the system (for example, multiple user databases), or project directories that have been configured against the old version of the package that is to be overwritten. There's no way for cabal-install
to be completely sure, that's why it warns that reinstalls are always dangerous.
这篇关于为什么cabal重新安装“始终危险”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!