我刚刚安装并更新了 cabal,但它仍然使用原始版本(1.16.0.2)而不是更新后的 1.22.4.0。通过 apt-get 安装后我运行的命令:
$ cabal update $ cabal install cabal-install cabal
这按照预期构建并安装了新版本的 cabal-install 和 cabal,但是当我这样做时,cabal --v
它仍然打印:
$ cabal --v cabal-install version 1.16.0.2 using version 1.16.0 of the Cabal library
这里可能出了什么问题?我的 $PATH 变量是:
$ echo $PATH /home/user/.rvm/gems/ruby-2.2.2/bin:/home/user/.rvm/gems/ruby-2.2.2@global/bin:/home/user/.rvm/rubies/ruby-2.2.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/user/.rvm/bin:/home/user/.rvm/bin
阴谋集团位于:
$ which cabal /usr/bin/cabal
产生sudo find / -name *cabal*
:
$ sudo find / -name *cabal* /usr/bin/cabal /usr/share/doc/cabal-install /usr/share/vim/vim74/syntax/cabal.vim /etc/bash_completion.d/cabal /var/cache/apt/archives/cabal-install_1.16.0.2-2_amd64.deb /var/lib/dpkg/info/cabal-install.list /var/lib/dpkg/info/cabal-install.conffiles /var/lib/dpkg/info/cabal-install.md5sums /home/user/Downloads/pandoc-1.14.0.3/pandoc.cabal /home/user/.cabal /home/user/.cabal/bin/cabal /home/user/.cabal/share/doc/cabal-install-1.22.4.0 /home/user/.cabal/packages/hackage.haskell.org/cabal-install /home/user/.cabal/packages/hackage.haskell.org/cabal-install/1.22.4.0/cabal-install-1.22.4.0.tar.gz
答案1
Cabal 在下安装新的 cabal 版本
/home/user/.cabal/bin
因此,您必须直接调用/home/user/.cabal/bin/cabal
或添加
/home/user/.cabal/bin
到你的道路。
/usr/bin/cabal
是Debian打包的版本。