升级至 15.10 后橡胶失效

升级至 15.10 后橡胶失效

rubber 是一个将 LaTeX 文件编译为 pdf 文档的程序。升级后,当我尝试在文档上运行 rubber 时收到以下错误。对于巨大的堆栈跟踪,我深表歉意,但我查看它并没有给我任何提示。

Traceback (most recent call last):
  File "/usr/bin/rubber", line 4, in <module>
    sys.exit(Main()(sys.argv[1:]))
  File "/usr/lib/python2.7/dist-packages/rubber/cmdline.py", line 331, in __call__
    return self.main(cmdline)
  File "/usr/lib/python2.7/dist-packages/rubber/cmdline.py", line 287, in main
    ret = env.main.make(True)
  File "/usr/lib/python2.7/dist-packages/rubber/depend.py", line 164, in make
    ok = self.force_run()
  File "/usr/lib/python2.7/dist-packages/rubber/converters/latex.py", line 1288, in force_run
    return self.run(True)
  File "/usr/lib/python2.7/dist-packages/rubber/converters/latex.py", line 1310, in run
    if not self.post_compile():
  File "/usr/lib/python2.7/dist-packages/rubber/converters/latex.py", line 1261, in post_compile
    if not mod.post_compile():
  File "/usr/lib/python2.7/dist-packages/rubber/converters/latex.py", line 1526, in post_compile
    return self.pymodule.post_compile()
  File "/usr/lib/python2.7/dist-packages/rubber/latex_modules/bibtex.py", line 421, in post_compile
    return biblio.post_compile()
  File "/usr/lib/python2.7/dist-packages/rubber/latex_modules/bibtex.py", line 235, in post_compile
    return self.run()
  File "/usr/lib/python2.7/dist-packages/rubber/latex_modules/bibtex.py", line 258, in run
    if self.doc.env.execute(['bibtex', basename], doc, pwd=workdir):
  File "/usr/lib/python2.7/dist-packages/rubber/environment.py", line 226, in execute
    stderr = stderr)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory: ''

根据要求,输出lsb_release -a; apt-cache policy rubber

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 15.10
Release:    15.10
Codename:   wily
rubber:
  Installed: 1.2-1
  Candidate: 1.2-1
  Version table:
 *** 1.2-1 0
        500 http://us.archive.ubuntu.com/ubuntu/ wily/universe amd64 Packages
        100 /var/lib/dpkg/status

答案1

该错误是由脚本引起的bibtex.py,该脚本无法获取 workdir os.path.dirname()

临时解决方法是从pwd=workdir258 行删除参数,并且仅rubber在 TeX 文件夹内执行。

相关内容