AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1034894
Accepted
Apurba
Apurba
Asked: 2018-05-12 03:59:31 +0800 CST2018-05-12 03:59:31 +0800 CST 2018-05-12 03:59:31 +0800 CST

安装到 18.04 后,Render LaTeX 在 Inkscape 中不起作用

  • 772

我最近安装了 Ubuntu 18.04(不升级,全新安装)。在 Ubuntu 18.04 中,Inkscape 中的渲染 LaTeX 功能不起作用。以下是错误输出:

*** WARNING - the DELAYBIND command has been deprecated, and will be

           removed in the next version. For now you can restore

           the behaviour by using -dREALLYDEALYBIND but if you

           require continued use of this command you should contact

           the Ghostscript developers. Commercial customers of

           Artifex should email their support contact, free users

           are encouraged to talk to us on the #ghostscript IRC

           channel on irc.freenode.net.



Unrecoverable error: undefined in DELAYBIND

PostScript/PDF Interpreter finished. Return status 65280 executed command : /usr/bin/gs -q -dDELAYBIND -dWRITESYSTEMDICT -dNODISPLAY -dNOEPS "/tmp/psin5eNNQ0"

The interpreter seems to have failed, cannot proceed !

Traceback (most recent call last):
  File "eqtexsvg.py", line 160, in <module>
    e.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 283, in affect
    self.effect()
  File "eqtexsvg.py", line 154, in effect
    svg_open(self, svg_file)
  File "eqtexsvg.py", line 81, in svg_open
    doc = inkex.etree.parse(filename)
  File "src/lxml/etree.pyx", line 3426, in lxml.etree.parse
  File "src/lxml/parser.pxi", line 1839, in lxml.etree._parseDocument
  File "src/lxml/parser.pxi", line 1865, in lxml.etree._parseDocumentFromURL
  File "src/lxml/parser.pxi", line 1769, in lxml.etree._parseDocFromFile
  File "src/lxml/parser.pxi", line 1162, in lxml.etree._BaseParser._parseDocFromFile
  File "src/lxml/parser.pxi", line 600, in lxml.etree._ParserContext._handleParseResultDoc
  File "src/lxml/parser.pxi", line 710, in lxml.etree._handleParseResult
  File "src/lxml/parser.pxi", line 639, in lxml.etree._raiseParseError
  File "/tmp/inkscape-Y11679/eq.svg", line 1
lxml.etree.XMLSyntaxError: Document is empty, line 1, column 1

从谷歌搜索,我发现问题是由于ghostscript而出现的。Render>LaTeX扩展实际上调用pstoeditwhich in terns 调用ghostscript使用flag从DELAYBIND转换LaTeX为SVG. 但在较新版本中ghostscript该标志DELAYBIND已被弃用。解决方案是降级ghostscript到或低于 9.20 版本。以下是我尝试降级ghostscript但没有成功的方法。

从 apt 或 apttitute 降级 ghostscript

我尝试ghostrict使用以下命令降级。

sudo aptitude install ghostscript=9.18~dfsg~0-0ubuntu2

或者通过使用

sudo apt install ghostscript=9.18~dfsg~0-0ubuntu2

我得到以下输出

Unable to find a version "9.18~dfsg~0-0ubuntu2" for the package "ghostscript"

或者

E: Version '9.18~dfsg~0-0ubuntu2' for 'ghostscript' was not found

我尝试了其他版本,例如 9.20 的 ghost 脚本。没有任何效果。

从 ghostscript 网站安装:

我已经ghostscript从下载ghostscript website,并使用以下命令安装

sudo ./configure
sudo make
sudo make install

似乎安装完成了,但是如果我正在运行命令

ghostscript  --version

它显示版本为 9.22。

我能找到的所有在线解决方案都指向降级ghostscript. 但我不知道如何在 Ubuntu 18.04 中做到这一点。

有什么解决办法吗?

package-management apt inkscape downgrade ghostscript
  • 6 6 个回答
  • 5505 Views

6 个回答

  • Voted
  1. Best Answer
    sugab
    2018-08-22T21:33:06+08:002018-08-22T21:33:06+08:00

    假设您使用 Latex Inkscape 插件texText,它除了支持 ghostscript+pstoedit 之外的 pdf2svg。因此,对于 Ubuntu 18.04,安装 pdf2svg 可以解决问题

    sudo apt install pdf2svg
    

    它适用于 Ubuntu 18.04、InkScape 0.92。

    • 5
  2. jcwinkler
    2018-06-14T03:30:28+08:002018-06-14T03:30:28+08:00

    在这种特定情况下,从源代码构建 pstoedit 并不能解决问题,因为默认情况下不包含 svg 后端(如上文所述)。因此,我建议将 ghostscript 更新到 9.23 版本。

    从https://www.ghostscript.com/download/gsdnld.html下载并解压 ghostscript 源码包后,进入源码目录并执行以下三个命令:

    ./configure --prefix=/usr
    make
    sudo make install
    

    这只是覆盖了现有的 ghostscript 版本,然后就不需要摆弄依赖关系了。

    如果由于新的 gs 版本而在其他地方遇到问题,您可以通过以下方式轻松切换回来

    sudo apt-get install ghostscript --reinstall
    

    该方案的缺点是系统安装的ghostscript的安全更新会覆盖你的安装,需要重新安装。但是,只要没有可用的预构建二进制文件,这可能是第一个解决方法

    • 2
  3. SRDC
    2018-05-12T15:11:32+08:002018-05-12T15:11:32+08:00

    使用 pstoedit 将 EPS 转换为 DXF 文件时遇到了同样的问题。无需降级ghostscript!

    最简单的解决方案

    1. 升级pstoedit
    2. 使用标志运行 pstoedit -rdb。

    一步步

    1. 删除 Ubuntu-current pstoedit:
      • sudo apt-get remove pstoedit
    2. 下载最新的pstoedit:
      • 从 Sourceforge 下载最新版本 ( https://sourceforge.net/projects/pstoedit/files/latest/download?source=files )
      • 提取到您选择的文件夹
    3. 安装新的 pstoedit:

      • 在终端中打开提取的文件夹(右键单击文件夹→在终端中打开)
      • 跑:

        ./configure
        make
        sudo make install
        
    4. 使用 -rdb 标志运行:

      • 现在,当您运行 pstoedit 时,添加-rdb标志。
      • 例如: pstoedit -dt -f dxf:-polyaslines "input-file.eps" -rdb "output-file.dxf"
      • 此标志告诉 pstoedit 使用新的“强制”选项使 ghostscript 接受 delaybind 命令。发行说明警告说,这只能在受信任的文件上完成,因为它可能会打开安全漏洞。
    • 1
  4. Marduk
    2018-11-28T02:38:39+08:002018-11-28T02:38:39+08:00

    对于不想编译更新pstoedit或降级的人ghostscript,还有第三种选择:Nix 包管理器。它适用于 Mac、Linux 和 Windows 10,因此这是一个跨平台的解决方案。一旦你安装了 Nix 并且它在你的PATH.

    nix-env -i pstoedit.

    Inkscape 中的 LaTeXing 快乐!

    • 1
  5. jackw11111
    2018-05-14T18:44:06+08:002018-05-14T18:44:06+08:00

    9.18 版本位于 xenial (16.04) 存档中。如果要安装它,则必须将 xenial 存储库添加到sources.list文件中:

    sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe"
    

    然后你应该能够看到可用的版本apt-cache madison ghostscript

    鬼脚本 | 9.18~dfsg~0-0ubuntu2 | http://archive.ubuntu.com/ubuntu xenial/main amd64 包

    并安装sudo apt-get install ghostscript=9.18~dfsg~0-0ubuntu2

    • 0
  6. Yan King Yin
    2019-02-18T02:23:45+08:002019-02-18T02:23:45+08:00

    对我来说,安装后它可以工作pstoedit:

    sudo apt install pstoedit
    
    • 0

相关问题

  • 如何从命令行仅安装安全更新?关于如何管理更新的一些提示

  • 如何从命令行判断机器是否需要重新启动?

  • 有没有办法重置所有包/源并从头开始?

  • 如何回滚到 PHP 5.2?

  • 包管理器之间有什么区别?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve