首页 新闻 会员 周边 捐助

mac使用brew安装graphviz报错无法解决

0
悬赏园豆:80 [待解决问题]

已经尝试过了配置为国内源
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
也重新装了brew
https://www.jianshu.com/p/3056691a07f5
按照这个上面进行了配置,也配置了/etc/resolv.conf
nameserver 119.29.29.29
host也配置了
185.199.108.133 sourceforge.mirrorservice.org
联VPN也尝试过了。
还是不行,请大神指点一二,解决一下,已经卡在这里三四天了,就想着跑的决策树模型能用graphviz画出个好一点的图。

MacBook-Pro:~ $ brew install graphviz
Warning: You are using macOS 10.14.
We (and Apple) do not provide support for this old version.
It is expected behaviour that some formulae will fail to build in this old version.
It is expected behaviour that Homebrew will be buggy and slow.
Do not create any issues about this on Homebrew's GitHub repositories.
Do not create any issues even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help from Homebrew or its maintainers on social media.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.

==> Fetching dependencies for graphviz: libpng, pkg-config, freetype, mpdecimal, ca-certificates, openssl@3, readline, sqlite, xz, libffi, python@3.12, fontconfig, cmake, nasm, jpeg-turbo, brotli, giflib, highway, imath, lz4, zstd, libtiff, little-cms2, openexr, webp, docbook, icu4c, boost, source-highlight, asciidoc, docbook-xsl, bison, gettext, flex, doxygen, python@3.11, certifi, sphinx-doc, jpeg-xl, ninja, meson, libsodium, lua, ncurses, berkeley-db@5, gdbm, perl, libyaml, m4, autoconf, libssh2, libgit2, z3, pcre2, swig, llvm, rust, ruby, vim, libvmaf, yasm, aom, libavif, gd, python-setuptools, glib, apr, apr-util, utf8proc, scons, subversion, jasper, netpbm, automake, libtool, gts, util-macros, xorgproto, libxau, libxdmcp, xcb-proto, libxcb, xtrans, libx11, libxext, libxrender, lzo, pixman, cairo, docutils, gobject-introspection, gdk-pixbuf, fribidi, graphite2, harfbuzz, pango and librsvg
==> Fetching libpng
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/ff6b3c8
######################################################################### 100.0%
==> Downloading https://downloads.sourceforge.net/project/libpng/libpng16/1.6.43
==> Downloading from https://zenlayer.dl.sourceforge.net/project/libpng/libpng16
################ 21.9%
curl: (56) LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
######################## 32.9%
curl: (18) transfer closed with 700266 bytes remaining to read
Trying a mirror...
==> Downloading https://sourceforge.mirrorservice.org/l/li/libpng/libpng16/1.6.4
Warning: Transient problem: timeout Will retry in 1 seconds. 3 retries left.

curl: (51) SSL: no alternative certificate subject name matches target host name 'sourceforge.mirrorservice.org'
Error: graphviz: Failed to download resource "libpng"
Download failed: https://sourceforge.mirrorservice.org/l/li/libpng/libpng16/1.6.43/libpng-1.6.43.tar.xz

甯可凡的主页 甯可凡 | 初学一级 | 园豆:124
提问于:2024-06-06 22:53
< >
分享
所有回答(2)
0

报错内容应该是mac系统版本太低导致的,我用另外一太Windows电脑实现了我想要的功能。

甯可凡 | 园豆:124 (初学一级) | 2024-06-07 20:09
0

看起来你在安装graphviz时遇到了一些网络和SSL相关的问题。这种情况通常是由于网络连接或者源的问题引起的。下面是一些可能的解决方案和建议:

  1. 使用清华大学的镜像源安装
    清华大学提供了Homebrew的镜像源,可以尝试使用这个源来安装graphviz。以下是配置步骤:

替换Homebrew默认源为清华源:
bash
Copy code

替换Homebrew默认源为清华源

cd "$(brew --repo)"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git

替换Homebrew Bottles源为清华源

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc
2. 解决SSL证书问题
有时候会因为SSL证书的问题导致下载失败。尝试更新或者重新安装curl和openssl:

bash
Copy code
brew update
brew reinstall curl openssl
3. 使用VPN或者其他网络环境
有时候网络环境本身会对下载产生影响。尝试连接到不同的网络,或者使用VPN,确保能够稳定地访问外部资源。

  1. 手动下载libpng并安装
    如果特定的依赖项(比如libpng)下载失败,可以考虑手动下载,并且使用brew install时使用本地文件路径进行安装。例如:

bash
Copy code

手动下载libpng

wget -O libpng-1.6.43.tar.xz https://downloads.sourceforge.net/project/libpng/libpng16/1.6.43/libpng-1.6.43.tar.xz

使用本地文件路径安装graphviz

brew install --build-from-source --force-bottle graphviz.rb --verbose --no-sandbox
5. 更新Homebrew和重试
确保你的Homebrew是最新的,并且尝试重新安装graphviz:

bash
Copy code
brew update
brew reinstall graphviz
总结
通过以上方法,你应该能够解决graphviz安装时遇到的网络和依赖问题。如果问题仍然存在,请查看详细的错误日志并尝试调整网络设置或者使用备用方法安装。

Technologyforgood | 园豆:7775 (大侠五级) | 2024-06-13 17:04
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册