V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
steveshi
V2EX  ›  macOS

求助,通过 Homebrew 无法编译 mpv 0.21.0

  •  
  •   steveshi · 2016-10-25 11:00:18 +08:00 · 2077 次点击
    这是一个创建于 2747 天前的主题,其中的信息可能已经有所发展或是发生改变。

    mpv 出 0.21.0 版本的时候用 brew upgrade 更新就一直无法通过,索性拆卸重装,但一直出错…… Python 和 docutils 之类的也都重装过,出错的原因都是同一个。

    系统版本

    macOS 10.12.1

    Homebrew 1.0.8

    Python 3.5.2

    错误显示

     ~ brew install --HEAD --with-bluray-support --with-libdvdread --with-little-cms2 --with-lua --with-bundle mpv
    ==> Using the sandbox
    ==> Cloning https://github.com/mpv-player/mpv.git
    Updating ~/Library/Caches/Homebrew/mpv--git
    ==> Checking out branch master
    ==> ./bootstrap.py
    ==> python3 waf configure --prefix=/usr/local/Cellar/mpv/HEAD-c8e3ee4_1 --enable
    ==> python3 waf install
    Last 15 lines from ~/Library/Logs/Homebrew/mpv/03.python3:
    + install /usr/local/Cellar/mpv/HEAD-c8e3ee4_1/share/mpv/icons/hicolor/32x32/apps/mpv.png (from etc/mpv-icon-8bit-32x32.png)
    
    
    + install /usr/local/Cellar/mpv/HEAD-c8e3ee4_1/share/mpv/icons/hicolor/64x64/apps/mpv.png (from etc/mpv-icon-8bit-64x64.png)
    + install /usr/local/Cellar/mpv/HEAD-c8e3ee4_1/share/mpv/icons/hicolor/scalable/apps/mpv.svg (from etc/mpv-gradient.svg)
    + install /usr/local/Cellar/mpv/HEAD-c8e3ee4_1/share/mpv/icons/hicolor/symbolic/apps/mpv-symbolic.svg (from etc/mpv-symbolic.svg)
    + install /usr/local/Cellar/mpv/HEAD-c8e3ee4_1/lib/pkgconfig/mpv.pc (from build/libmpv/mpv.pc)
    
    
    Traceback (most recent call last):
      File "/usr/local/opt/docutils/bin/rst2man.py", line 21, in <module>
        from docutils.core import publish_cmdline, default_description
    ImportError: No module named docutils.core
    
    Waf: Leaving directory `/private/tmp/mpv-20161025-1992-1rbrsdt/build'
    Build failed
     -> task in 'rst2man' failed (exit status 1):
    	{task 4415969096: rst2man mpv.rst -> mpv.1}
    ' /usr/local/opt/docutils/bin/rst2man.py ../DOCS/man/mpv.rst DOCS/man/mpv.1 '
    
    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
    
    15 条回复    2016-10-25 14:18:59 +08:00
    helloSwift
        1
    helloSwift  
       2016-10-25 11:18:24 +08:00 via iPad   ❤️ 1
    brew install mpv --with-bundle
    brew linkapps mpv
    JackBlack2006
        2
    JackBlack2006  
       2016-10-25 11:19:53 +08:00
    lua 不是默认装的么,还加个命令干嘛
    steveshi
        3
    steveshi  
    OP
       2016-10-25 11:24:50 +08:00
    @helloSwift 这样安装也是同样出错
    steveshi
        4
    steveshi  
    OP
       2016-10-25 11:25:21 +08:00
    @JackBlack2006 之前命令是直接网上教程里的,不加 lua 也是同样错误
    JackBlack2006
        5
    JackBlack2006  
       2016-10-25 11:28:25 +08:00   ❤️ 1
    @steveshi 教程过时太快,你打 brew info mpv 一看就明白了
    Shared
        6
    Shared  
       2016-10-25 11:29:29 +08:00
    > ImportError: No module named docutils.core

    需要安装 python-docutils 这个库
    steveshi
        7
    steveshi  
    OP
       2016-10-25 11:31:06 +08:00
    @Shared 装了,还是提示这个,无论是用 brew 装还是 pip 装都还是这个错误。
    hackpro
        8
    hackpro  
       2016-10-25 11:32:13 +08:00   ❤️ 1
    pip install docutils
    steveshi
        9
    steveshi  
    OP
       2016-10-25 11:33:32 +08:00
    @hackpro Requirement already satisfied (use --upgrade to upgrade): docutils in /usr/local/Cellar/pyenv/1.0.2_1/versions/3.5.2/lib/python3.5/site-packages/docutils-0.12-py3.5.egg
    Shared
        10
    Shared  
       2016-10-25 11:38:13 +08:00
    pip 还是 pip3 安装的? Python 2 和 3 都安装下试试
    steveshi
        11
    steveshi  
    OP
       2016-10-25 11:41:55 +08:00
    @Shared 用 pip3 装的, python2 我直接是系统默认环境下的,没额外装,用 pyenv 指定了全局用 python3
    Shared
        12
    Shared  
       2016-10-25 13:45:58 +08:00   ❤️ 1
    @steveshi 你看这一句

    > /usr/local/opt/docutils/bin/rst2man.py

    不是 /usr/loca/Cellar 里的,应该还是 PATH 问题
    oxoxoxox
        13
    oxoxoxox  
       2016-10-25 13:58:08 +08:00   ❤️ 1
    brew link --overwrite docutils
    你之前执行 brew upgrade -a 的时候里面其实有提示的,你肯定没注意看
    steveshi
        14
    steveshi  
    OP
       2016-10-25 14:09:00 +08:00
    @Shared 我是怀疑 path 有问题,确实是识别不出 docutils ,但是这个路径上的文件都是存在的,我也晕了。
    steveshi
        15
    steveshi  
    OP
       2016-10-25 14:18:59 +08:00
    @oxoxoxox 确实是 link 一下就好了……非常感谢
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2240 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 08:36 · PVG 16:36 · LAX 01:36 · JFK 04:36
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.