无法使用Homebrew在OS X 10.7.5中安装pandoc

时间:2016-10-31 19:32:37

标签: homebrew osx-lion pandoc

我刚刚在Lion 10.7.5上安装了Homebrew(它确实抱怨它不受支持,所以我知道这可能是原因)。我试图安装pandoc,显然密码网引起了问题。

~ $ brew install pandoc
Warning: You are using macOS 10.7.
We (and Apple) do not provide support for this old version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
==> Using the sandbox
==> Downloading https://hackage.haskell.org/package/pandoc-1.18/pandoc-1.18.tar.
Already downloaded: /Users/username/Library/Caches/Homebrew/pandoc-1.18.tar.gz
==> cabal sandbox init
==> cabal update
==> cabal install --jobs=4 --max-backjumps=100000 --only-dependencies --constrai
Last 15 lines from /Users/username/Library/Logs/Homebrew/pandoc/03.cabal:
Installed pandoc-types-1.17.0.4
Downloading texmath-0.8.6.7...
Configuring texmath-0.8.6.7...
Building texmath-0.8.6.7...
Installed texmath-0.8.6.7
cabal: Error: some packages failed to install:
connection-0.2.6 depends on cryptonite-0.20 which failed to install.
cryptonite-0.20 failed during the building phase. The exception was:
ExitFailure 1
http-client-tls-0.3.3 depends on cryptonite-0.20 which failed to install.
tls-1.3.8 depends on cryptonite-0.20 which failed to install.
x509-1.6.4 depends on cryptonite-0.20 which failed to install.
x509-store-1.6.2 depends on cryptonite-0.20 which failed to install.
x509-system-1.6.4 depends on cryptonite-0.20 which failed to install.
x509-validation-1.6.5 depends on cryptonite-0.20 which failed to install.

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
  https://github.com/Homebrew/homebrew-core/issues

Warning: You are using macOS 10.7.
We (and Apple) do not provide support for this old version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.

我希望我可以在10.7.5上安装pandoc。这是2011年初的MBP,带有4 GB RAM。较新的版本运行速度非常慢,所以除非必须,否则我不想从Lion升级。

更新:我最终升级到了小牛队。一切都很好(有些打嗝,没什么大不了的)。 Homebrew安装得很好,然后用Homebrew安装了pandoc,现在一切都在嗡嗡作响。

1 个答案:

答案 0 :(得分:0)

https://discourse.brew.sh/t/how-to-install-old-version-of-a-formula的启发,我找到了解决方法。

由于Homebrew不再提供Pandoc < 2.0,我们需要将其隐藏到当前的公式中:

  • $ cd "$(brew --repo homebrew/core)"
  • Formula/pandoc.rb中,将url的内容替换为https://hackage.haskell.org/package/pandoc-1.19.2.4/pandoc-1.19.2.4.tar.gz,将sha256的内容替换为bbe08c1f7fcfea98b899f9956c04159d493a26f65d3350aa6579aa5b93203556

现在您可以安装Pandoc:$ brew install pandoc