概括

概括

我在 AMD 64 X2 上安装了 Ubuntu 14.04 LTS(操作系统类型 32 位)。我想安装,Draftsight但似乎不可能:首先它说我安装了错误的架构软件版本(我已经安装了所有 i386 软件包),但最后它总是给我错误

subprocess new pre-installation script returned error exit status 126.

是否可以在 32 位 Ubuntu 和 AMD 上安装这样的软件?

是否有与我的配置兼容的软件版本?我是否必须下载旧版本?

多谢,

马蒂亚

答案1

是否可以安装 64 位操作系统,或者您的硬件不支持该操作系统?在 Linux 中,64 位是“正常的”,大多数程序都是首先为 64 位设计的。

答案2

我已成功在 32 位 Ubuntu 系统(当然,在 64 位处理器上)中安装并运行 64 位新 DraftSight。没有(或很少)使用肮脏的黑客手段。

概括

  1. 解决方案的关键是能够通过添加 amd64 存储库作为软件包源在 i386 Ubuntu 系统中安装和运行 amd64 内核。
  2. 那么安装 64 位.deb肯定是一件简单的事情。但是,有一个问题,即软件包的安装脚本需要额外的先决条件 amd64 库才能运行。(这不是由软件包的依赖项强制的。)

    • 解决方案:apt-get install libgtk2.0-0:amd64
  3. 然后,已安装的可执行文件 DraftSight 没有运行,因为仍然缺少一些 amd64 库(包的正式依赖关系也没有正确反映)。首先,它无法链接到丢失的动态库(.so);

    • 解决方案:apt-get install libgl1-mesa-glx:amd64

    其次,它拒绝运行,并报告无法加载某些插件。安装一些 amd64 软件包最终解决了问题;现在它可以运行了。

    • 解决方案:

    • apt-get install libcanberra-gtk-module:amd64 gtk2-engines-murrine:amd64

    • dpkg --extract overlay-scrollbar-gtk2_0.2.16+r359+15.04.20150319-0ubuntu1_amd64.deb /(实际上,apt-get install overlay-scrollbar-gtk2:amd64 在 15.10 (Wily) 中运行良好,不需要肮脏的黑客!)
    • (可能是可选的)apt-get install libgstreamer0.10-0:amd64 gstreamer0.10-plugins-base:amd64 libnss-mdns:amd64 libodbc1:amd64 libgnomeui-0:amd64 libmng2:amd64

我在 15.04 (Vivid)/i386 上做了实验,最后一个draftSight.deb版本报告dpkg如下:

$ dpkg-query -l draftsight
...
ii  draftsight                     2015.3.0.3020        amd64                With DraftSight, you can easily create professional CAD drawings.

1. 使用 amd64 内核

这基本上是一个问题:

dpkg --add-architecture amd64
apt-get update
apt-get install linux-generic:amd64

然后重新启动进入新内核。(当然,你应该已经安装并测试过另一个版本的后备 i386 内核以确保安全。)

(我了解到这是可能的,这要感谢https://askubuntu.com/a/635774/19753。总的来说,这种方法效果很好:在我的一台电脑上,没有任何问题。然而,另一台具有不同硬件的电脑启动时却不稳定——https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/1495116

您可以安装特定的 linux-image-extra-...-generic 包,而不是上面的最后一个命令(这将减少依赖项)。 (就我而言,我使用的是linux-image-extra-3.19.0-28-generic。)

这是可能的,如果你的 CPU 是 64 位

2. 安装 draftSight.deb

为了安装draftSight.deb并依靠 APT 机制来获取所有依赖项,我使用了简单的工具gdebi(Ubuntu 的标准“软件中心”在理论上同样适合这项任务),我发现这要感谢使用 gdebi 而不是 Ubuntu 软件中心来安装 .deb 文件是否安全?gdebi vs dpkg:gdebi 如何自动获取缺失的依赖项?我可以将 gdebi 用于所有其他 .deb 软件包的安装吗?

但是,安装脚本的要求存在问题:

# gdebi ~imz/Загрузки/draftSight.deb 
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Building data structures... Done 
Building data structures... Done 
Requires the installation of the following packages: libaudio2:amd64 libice6:amd64 libsm6:amd64 libuuid1:amd64 libx11-6:amd64 libxau6:amd64 libxcb1:amd64 libxdmcp6:amd64 libxt6:amd64 

With DraftSight, you can easily create professional CAD drawings. Supported file formats are DWT, DXF and DWG.
Do you want to install the software package? [y/N]:y
...
Fetched 934 kB in 6s (153 kB/s)                                                                                                                
Selecting previously unselected package libuuid1:amd64.
(Reading database ... 461362 files and directories currently installed.)
Preparing to unpack .../libuuid1_2.25.2-4ubuntu3_amd64.deb ...
Unpacking libuuid1:amd64 (2.25.2-4ubuntu3) ...
...
Selecting previously unselected package draftsight.
(Reading database ... 461380 files and directories currently installed.)
Preparing to unpack .../draftSight.deb ...
access control disabled, clients can connect from any host
access control disabled, clients can connect from any host
access control disabled, clients can connect from any host
/var/lib/dpkg/tmp.ci/ShowLicense: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
access control enabled, only authorized clients can connect
access control enabled, only authorized clients can connect
access control enabled, only authorized clients can connect
dpkg: error processing archive /home/imz/Загрузки/draftSight.deb (--install):
 subprocess new pre-installation script returned error exit status 127
Errors were encountered while processing:
 /home/imz/Загрузки/draftSight.deb
#

因此,让我们寻找必需的但缺失的libgtk-x11-2.0.so.0(大概是 amd64):

# locate libgtk-x11-2.0.so.0 | xargs dpkg-query -S
dpkg-query: no path found matching pattern /mnt/disk/usr/lib/libgtk-x11-2.0.so.0
dpkg-query: no path found matching pattern /mnt/disk/usr/lib/libgtk-x11-2.0.so.0.2000.1
libgtk2.0-0:i386: /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
libgtk2.0-0:i386: /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0.2400.27
root@yli-laptop:~# aptsh
Generating and mapping caches...
Reading commands history...
aptsh> install libgtk2.0-0:amd64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  firefox-locale-ru gtk3-engines-unico hddtemp libass4 libaudio2:amd64 libc-ares2 libcrypt-passwdmd5-perl libevas1-engines-core libgdata13
  libgnome-media-profiles-3.0-0 libgrip0 libice6:amd64 libicu48 libidl-common libinput0 libjpeg-progs libjpeg-turbo-progs libllvm3.5
  libmikmod2 libminiupnpc8 libmirclient8driver-mesa libmircommon2 libpanel-applet-4-0 libpoppler46 libreoffice-help-en-gb libreoffice-help-ru
  libreoffice-l10n-en-gb libreoffice-l10n-ru libsm6:amd64 libt1-5 libtar0 libupstart1 libvncserver0 libwpg-0.2-2 libwps-0.2-2 libwxbase2.8-0
  libwxgtk2.8-0 libxt6:amd64 linux-headers-3.16.0-44 qtdeclarative5-ubuntu-web-plugin-assets ttf-bengali-fonts ttf-devanagari-fonts
  ttf-gujarati-fonts ttf-kannada-fonts ttf-oriya-fonts ttf-sil-doulos ttf-tamil-fonts ttf-telugu-fonts vlc-plugin-pulse
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
...
Suggested packages:
  gnutls-bin:amd64 krb5-doc:amd64 krb5-user:amd64 librsvg2-common:amd64 gvfs:amd64 libjasper-runtime:amd64
The following NEW packages will be installed
  libatk1.0-0:amd64 libavahi-client3:amd64 libavahi-common-data:amd64 libavahi-common3:amd64 libcairo2:amd64 libcomerr2:amd64 libcups2:amd64
  libdatrie1:amd64 libexpat1:amd64 libfontconfig1:amd64 libfreetype6:amd64 libgdk-pixbuf2.0-0:amd64 libgmp10:amd64 libgnutls-deb0-28:amd64
  libgraphite2-3:amd64 libgssapi-krb5-2:amd64 libgtk2.0-0:amd64 libharfbuzz0b:amd64 libhogweed2:amd64 libjasper1:amd64 libjbig0:amd64
  libjpeg-turbo8:amd64 libjpeg8:amd64 libk5crypto3:amd64 libkeyutils1:amd64 libkrb5-3:amd64 libkrb5support0:amd64 liblzma5:amd64
  libnettle4:amd64 libp11-kit0:amd64 libpango-1.0-0:amd64 libpangocairo-1.0-0:amd64 libpangoft2-1.0-0:amd64 libpixman-1-0:amd64
  libpng12-0:amd64 libtasn1-6:amd64 libthai0:amd64 libtiff5:amd64 libxcb-render0:amd64 libxcb-shm0:amd64 libxcomposite1:amd64
  libxcursor1:amd64 libxdamage1:amd64 libxext6:amd64 libxfixes3:amd64 libxi6:amd64 libxinerama1:amd64 libxrandr2:amd64 libxrender1:amd64
0 to upgrade, 49 to newly install, 0 to remove and 10 not to upgrade.
# 

此后,安装确实成功了。

3. 运行起来

现在庆祝成功还为时过早。

DraftSight 出现在菜单中,但它没有启动。所以我想从命令行运行它。它不在路径中。(现在我想也许它添加了系统 bash_profile 或类似的东西的路径,但我没有重新登录来获取新的环境变量。)让我们搜索它的可执行文件:

$ dpkg-query -L draftsight | xargs file | fgrep exec
/opt/dassault-systemes/DraftSight/support/setIconsInMenu.sh:                                                       Bourne-Again shell script, ASCII text executable
/opt/dassault-systemes/DraftSight/support/setIconsInButtons.sh:                                                    Bourne-Again shell script, ASCII text executable
/opt/dassault-systemes/DraftSight/Linux/FxCrashRptApp:                                                             ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=d729c303d79cbca820aaeb518199856c0bc66d09, not stripped
/opt/dassault-systemes/DraftSight/Linux/DraftSight:                                                                ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=bfff485505b76cbb682e236471ae62c66f657b3f, not stripped
/opt/dassault-systemes/DraftSight/Linux/HelpGuide:                                                                 ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=21fc1cb4c0971271df7fb9ffad84fd46bdd6627f, not stripped
$

并运行它,并查看错误:

$ /opt/dassault-systemes/DraftSight/Linux/DraftSight
/opt/dassault-systemes/DraftSight/Linux/DraftSight: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory
$

实际上,结果是没有 PATH 设置,因此我这样做了:

ln -s /opt/dassault-systemes/DraftSight/Linux/DraftSight /usr/local/bin/

缺少链接到的 amd64 库

再次寻找缺少的 amd64 库:

$ locate libGL.so.1 | xargs dpkg-query -S
dpkg-query: не найден путь, подходящий под шаблон /mnt/disk/usr/lib/mesa/libGL.so.1
dpkg-query: не найден путь, подходящий под шаблон /mnt/disk/usr/lib/mesa/libGL.so.1.2
libgl1-mesa-glx:i386: /usr/lib/i386-linux-gnu/mesa/libGL.so.1
libgl1-mesa-glx:i386: /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0
$

并安装它:

# aptsh
aptsh> install libgl1-mesa-glx:amd64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libdrm-intel1:amd64 libdrm-nouveau2:amd64 libdrm-radeon1:amd64 libdrm2:amd64 libedit2:amd64 libelf1:amd64 libgl1-mesa-dri:amd64
  libglapi-mesa:amd64 libllvm3.6:amd64 libpciaccess0:amd64 libtinfo5:amd64 libtxc-dxtn-s2tc0:amd64 libudev1:amd64 libx11-xcb1:amd64
  libxcb-dri2-0:amd64 libxcb-dri3-0:amd64 libxcb-glx0:amd64 libxcb-present0:amd64 libxcb-sync1:amd64 libxshmfence1:amd64 libxxf86vm1:amd64
The following NEW packages will be installed
  libdrm-intel1:amd64 libdrm-nouveau2:amd64 libdrm-radeon1:amd64 libdrm2:amd64 libedit2:amd64 libelf1:amd64 libgl1-mesa-dri:amd64
  libgl1-mesa-glx:amd64 libglapi-mesa:amd64 libllvm3.6:amd64 libpciaccess0:amd64 libtinfo5:amd64 libtxc-dxtn-s2tc0:amd64 libudev1:amd64
  libx11-xcb1:amd64 libxcb-dri2-0:amd64 libxcb-dri3-0:amd64 libxcb-glx0:amd64 libxcb-present0:amd64 libxcb-sync1:amd64 libxshmfence1:amd64
  libxxf86vm1:amd64
0 to upgrade, 22 to newly install, 0 to remove and 10 not to upgrade.
#

无法加载插件

下一个问题。

$ /opt/dassault-systemes/DraftSight/Linux/DraftSight
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "overlay-scrollbar"

(DraftSight:15724): Gtk-WARNING **: Загружаемый модуль тем не найден в module_path: «murrine»,

Gtk-Message: Failed to load module "canberra-gtk-module"
$

canberra-gtk-module 和 murrine

因此,尝试克服这个问题。overlay-scrollbar然而,amd64 的东西并不容易安装。

aptsh> search canberra-gtk-module
libcanberra-gtk-module - translates GTK+ widgets signals to event sounds
libcanberra-gtk-module-dbg - libcanberra GtkModule detached debugging symbols
aptsh> search murrine
gtk2-engines-murrine - cairo-based gtk+-2.0 theme engine
community-themes - desktop artwork by the Ubuntu community
gtk2-engines-nodoka - Nodoka theme engine for GTK+ 2.x
murrine-themes - themes for gtk2 murrine engine
shiki-colors - set of Metacity/GTK-2+ themes
aptsh> install libcanberra-gtk-module:amd64 gtk2-engines-murrine:amd64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libasound2:amd64 libcanberra-gtk0:amd64 libcanberra0:amd64 libltdl7:amd64 libogg0:amd64 libpango1.0-0:amd64 libpangox-1.0-0:amd64
  libpangoxft-1.0-0:amd64 libtdb1:amd64 libvorbis0a:amd64 libvorbisfile3:amd64 libxft2:amd64
Suggested packages:
  murrine-themes:amd64 libasound2-plugins:amd64 libcanberra-pulse:amd64
The following NEW packages will be installed
  gtk2-engines-murrine:amd64 libasound2:amd64 libcanberra-gtk-module:amd64 libcanberra-gtk0:amd64 libcanberra0:amd64 libltdl7:amd64
  libogg0:amd64 libpango1.0-0:amd64 libpangox-1.0-0:amd64 libpangoxft-1.0-0:amd64 libtdb1:amd64 libvorbis0a:amd64 libvorbisfile3:amd64
  libxft2:amd64
0 to upgrade, 14 to newly install, 0 to remove and 10 not to upgrade.

此后,错误消息少了很多:

$ /opt/dassault-systemes/DraftSight/Linux/DraftSight
Gtk-Message: Failed to load module "overlay-scrollbar"
$

overlay-scrollbar(Ubuntu 15.04 (Vivid) 中存在错误依赖项?15.10 (Wily) 中不存在)

不易安装:

aptsh> search overlay-scrollbar
overlay-scrollbar - Scrollbar overlay
overlay-scrollbar-gtk2 - GTK 2 module for overlay scrollbars
overlay-scrollbar-gtk3 - GTK 3 module for overlay scrollbars
aptsh> install overlay-scrollbar:amd64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package overlay-scrollbar:amd64 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'overlay-scrollbar:amd64' has no installation candidate
aptsh> install overlay-scrollbar-gtk2:amd64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
 overlay-scrollbar-gtk2:amd64 : Depends: overlay-scrollbar:amd64 but it is not installable
E: Unable to correct problems, you have held broken packages.
aptsh> install overlay-scrollbar
Reading package lists... Done
Building dependency tree       
Reading state information... Done
overlay-scrollbar is already the newest version.

(实际上,apt-get install overlay-scrollbar-gtk2:amd64 在 15.10 (Wily) 中运行良好,无需阅读下面的内容!15.04 (Vivid) 有这个问题overlay-scrollbar-0.2.16+r359+15.04.20150319-0ubuntu1,15.10 (Wily) 没有这个问题overlay-scrollbar-0.2.17.1+15.10.20150604.1-0ubuntu1Ubuntu 存储库中没有其他版本覆盖滚动条可用;我检查了这个以查看是否有 Wily 版本的反向移植。

现在的一个选择是进行一些 hacking(我的初始选择;见下文);另一个是从 Wily 安装软件包(这更干净,因为这样可以在 dpkg 数据库中跟踪已安装软件包的所有状态):

$ mkdir overlay-scrollbar_wily
$ cd overlay-scrollbar_wily/
$ wget http://mirrors.kernel.org/ubuntu/pool/main/o/overlay-scrollbar/overlay-scrollbar_0.2.17.1+15.10.20150604.1-0ubuntu1_all.deb http://mirrors.kernel.org/ubuntu/pool/main/o/overlay-scrollbar/overlay-scrollbar-gtk2_0.2.17.1+15.10.20150604.1-0ubuntu1_amd64.deb http://mirrors.kernel.org/ubuntu/pool/main/o/overlay-scrollbar/overlay-scrollbar-gtk2_0.2.17.1+15.10.20150604.1-0ubuntu1_i386.deb
$ sudo gdebi *
$ apt-get purge overlay-scrollbar-gtk3

另一个选择——稍微破解一下:

删除已安装的 overlay-scrollbar 包以了解 .deb 文件的 URL:

# apt-get install overlay-scrollbar --print-uris
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  overlay-scrollbar-gtk2 overlay-scrollbar-gtk3
The following NEW packages will be installed
  overlay-scrollbar overlay-scrollbar-gtk2 overlay-scrollbar-gtk3
0 to upgrade, 3 to newly install, 0 to remove and 10 not to upgrade.
...
'http://mirror.yandex.ru/ubuntu/pool/main/o/overlay-scrollbar/overlay-scrollbar-gtk2_0.2.16+r359+15.04.20150319-0ubuntu1_i386.deb' overlay-scrollbar-gtk2_0.2.16+r359+15.04.20150319-0ubuntu1_i386.deb 33048 MD5Sum:46b7550ac21e1dee03d11f83d1670cff
'http://mirror.yandex.ru/ubuntu/pool/main/o/overlay-scrollbar/overlay-scrollbar-gtk3_0.2.16+r359+15.04.20150319-0ubuntu1_i386.deb' overlay-scrollbar-gtk3_0.2.16+r359+15.04.20150319-0ubuntu1_i386.deb 34746 MD5Sum:18b346f535a1c0db7d0152f3d943af77
'http://mirror.yandex.ru/ubuntu/pool/main/o/overlay-scrollbar/overlay-scrollbar_0.2.16+r359+15.04.20150319-0ubuntu1_all.deb' overlay-scrollbar_0.2.16+r359+15.04.20150319-0ubuntu1_all.deb 2188 MD5Sum:5603fea988673ec388bde130508cb059
#

下载了 amd64 变体:

# wget http://mirror.yandex.ru/ubuntu/pool/main/o/overlay-scrollbar/overlay-scrollbar-gtk2_0.2.16+r359+15.04.20150319-0ubuntu1_amd64.deb
#

重新安装暂时删除的 i386 软件包:

# apt-get install overlay-scrollbar
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  overlay-scrollbar-gtk2 overlay-scrollbar-gtk3
The following NEW packages will be installed
  overlay-scrollbar overlay-scrollbar-gtk2 overlay-scrollbar-gtk3
0 to upgrade, 3 to newly install, 0 to remove and 10 not to upgrade.
#

在直接安装期间再次看到有缺陷的依赖性错误(我说它需要一个确实已经安装的包!TODO:将其作为错误报告给 Ubuntu!):

# dpkg --install overlay-scrollbar-gtk2_0.2.16+r359+15.04.20150319-0ubuntu1_amd64.deb 
Selecting previously unselected package overlay-scrollbar-gtk2:amd64.
(Reading database ... 462473 files and directories currently installed.)
Preparing to unpack overlay-scrollbar-gtk2_0.2.16+r359+15.04.20150319-0ubuntu1_amd64.deb ...
Unpacking overlay-scrollbar-gtk2:amd64 (0.2.16+r359+15.04.20150319-0ubuntu1) ...
dpkg: dependency problems prevent configuration of overlay-scrollbar-gtk2:amd64:
 overlay-scrollbar-gtk2:amd64 depends on overlay-scrollbar.

dpkg: error processing package overlay-scrollbar-gtk2:amd64 (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 overlay-scrollbar-gtk2:amd64
# 

强制安装:

dpkg --force-depends --install overlay-scrollbar-gtk2_0.2.16+r359+15.04.20150319-0ubuntu1_amd64.deb
(Reading database ... 462474 files and directories currently installed.)
Preparing to unpack overlay-scrollbar-gtk2_0.2.16+r359+15.04.20150319-0ubuntu1_amd64.deb ...
Unpacking overlay-scrollbar-gtk2:amd64 (0.2.16+r359+15.04.20150319-0ubuntu1) over (0.2.16+r359+15.04.20150319-0ubuntu1) ...
dpkg: overlay-scrollbar-gtk2:amd64: dependency problems, but configuring anyway as you requested:
 overlay-scrollbar-gtk2:amd64 depends on overlay-scrollbar.

Setting up overlay-scrollbar-gtk2:amd64 (0.2.16+r359+15.04.20150319-0ubuntu1) ...
Processing triggers for libc-bin (2.21-0ubuntu4) ...
root@yli-laptop:~# dpkg --force-depends --install overlay-scrollbar-gtk3_0.2.16+r359+15.04.20150319-0ubuntu1_i386.deb 
(Reading database ... 462474 files and directories currently installed.)
Preparing to unpack overlay-scrollbar-gtk3_0.2.16+r359+15.04.20150319-0ubuntu1_i386.deb ...
Unpacking overlay-scrollbar-gtk3:i386 (0.2.16+r359+15.04.20150319-0ubuntu1) over (0.2.16+r359+15.04.20150319-0ubuntu1) ...
Setting up overlay-scrollbar-gtk3:i386 (0.2.16+r359+15.04.20150319-0ubuntu1) ...
Processing triggers for libc-bin (2.21-0ubuntu4) ...
#

现在的问题是 APT 无法使用,因为它检测到了破坏的依赖关系:

root@yli-laptop:~# apt-get check
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run ‘apt-get -f install’ to correct these.
The following packages have unmet dependencies.
 overlay-scrollbar-gtk2:amd64 : Depends: overlay-scrollbar:amd64 but it is not installable
E: Unmet dependencies. Try using -f.
root@yli-laptop:~# apt-get install ubuntu-standard 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies.
 overlay-scrollbar-gtk2:amd64 : Depends: overlay-scrollbar:amd64 but it is not installable
 ubuntu-standard : Depends: strace but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@yli-laptop:~# apt-get install strace:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies.
 overlay-scrollbar-gtk2:amd64 : Depends: overlay-scrollbar:amd64 but it is not installable
 strace:amd64 : Conflicts: strace but 4.8-1ubuntu5 is to be installed
 strace : Conflicts: strace:amd64 but 4.8-1ubuntu5 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@yli-laptop:~#

为了解决这个问题,我必须始终暂时删除 overlay-scrollbar-gtk2:amd64(或者从数据库中正式删除它),并在需要运行 DraftSight 时强制恢复它。

我“发明”了一种安装库的愚蠢方法,但无需触及包数据库。而不是dpkg --force-depends --install,请执行以下操作:

dpkg --extract overlay-scrollbar-gtk2_0.2.16+r359+15.04.20150319-0ubuntu1_amd64.deb /

使用 strace 查找其他缺失的库

需要 strace:amd64。

这是一个简单的方法来过滤掉未找到的库,我希望从 Ubuntu 中获得,即/lib/首先在标准位置(如 /usr/lib/ 和 /lib/ --)进行搜索,然后/usr/lib/,这解释了我的过滤(如果最后查找的地方没有它,那么就意味着没有找到它):

$ strace -e trace=file -fF /opt/dassault-systemes/DraftSight/Linux/DraftSight 2> draftSight.trace
$ fgrep .so draftSight.1.trace | fgrep /usr/lib/x86_64-linux-gnu/ | fgrep ' -1' 
[pid 18287] open("/usr/lib/x86_64-linux-gnu/tls/x86_64/libodbc.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18287] open("/usr/lib/x86_64-linux-gnu/tls/libodbc.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18287] open("/usr/lib/x86_64-linux-gnu/x86_64/libodbc.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18287] open("/usr/lib/x86_64-linux-gnu/libiodbc.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18286] access("/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/x86_64-pc-linux-gnu/modules/libcanberra-gtk-module.so", F_OK) = -1 ENOENT (No such file or directory)
[pid 18286] access("/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/modules/libcanberra-gtk-module.so", F_OK) = -1 ENOENT (No such file or directory)
[pid 18286] access("/usr/lib/x86_64-linux-gnu/gtk-2.0/x86_64-pc-linux-gnu/modules/libcanberra-gtk-module.so", F_OK) = -1 ENOENT (No such file or directory)
[pid 18286] access("/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/x86_64-pc-linux-gnu/modules/liboverlay-scrollbar.so", F_OK) = -1 ENOENT (No such file or directory)
[pid 18286] access("/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/modules/liboverlay-scrollbar.so", F_OK) = -1 ENOENT (No such file or directory)
[pid 18286] access("/usr/lib/x86_64-linux-gnu/gtk-2.0/x86_64-pc-linux-gnu/modules/liboverlay-scrollbar.so", F_OK) = -1 ENOENT (No such file or directory)
[pid 18286] access("/usr/lib/x86_64-linux-gnu/gtk-2.0/modules/liboverlay-scrollbar.so", F_OK) = -1 ENOENT (No such file or directory)
[pid 18286] open("/usr/lib/x86_64-linux-gnu/liboverlay-scrollbar.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18286] access("/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/x86_64-pc-linux-gnu/engines/libmurrine.so", F_OK) = -1 ENOENT (No such file or directory)
[pid 18286] open("/usr/lib/x86_64-linux-gnu/libgnomeui-2.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18286] open("/usr/lib/x86_64-linux-gnu/gnomeui-2.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18286] open("/usr/lib/x86_64-linux-gnu/libgnomevfs-2.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18286] open("/usr/lib/x86_64-linux-gnu/gnomevfs-2.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18286] open("/usr/lib/x86_64-linux-gnu/dri/tls/r600_dri.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18286] open("/usr/lib/x86_64-linux-gnu/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18286] open("/usr/lib/x86_64-linux-gnu/libmng.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18286] open("/usr/lib/x86_64-linux-gnu/libtiff.so.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18286] open("/usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
$

因此,我安装了 amd64 gstreamer 库以防万一:

aptsh> install libgstreamer0.10-0:amd64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  gstreamer0.10-tools:amd64 gstreamer0.10-plugins-base:amd64
The following NEW packages will be installed
  libgstreamer0.10-0:amd64
0 to upgrade, 1 to newly install, 0 to remove and 10 not to upgrade.
...
aptsh> install gstreamer0.10-plugins-base:amd64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libcdparanoia0:amd64 libglu1-mesa:amd64 libgstreamer-plugins-base0.10-0:amd64 liborc-0.4-0:amd64 libtheora0:amd64 libvisual-0.4-0:amd64
  libvisual-0.4-plugins:amd64 libvorbisenc2:amd64
Suggested packages:
  gvfs:amd64 gstreamer-codec-install:amd64 gnome-codec-install:amd64
The following NEW packages will be installed
  gstreamer0.10-plugins-base:amd64 libcdparanoia0:amd64 libglu1-mesa:amd64 libgstreamer-plugins-base0.10-0:amd64 liborc-0.4-0:amd64
  libtheora0:amd64 libvisual-0.4-0:amd64 libvisual-0.4-plugins:amd64 libvorbisenc2:amd64
0 to upgrade, 9 to newly install, 0 to remove and 10 not to upgrade.

现在它运行了!

(还有一些缺失的库:libnss-mdns:amd64 libodbc1:amd64 libgnomeui-0:amd64 libmng2:amd64。)

答案3

来自他们的网站:http://www.3ds.com/products-services/draftsight-cad-software/free-download/

Windows 用户:DraftSight 2015 不支持 Windows XP 和 Vista。请确保为您的操作系统选择正确的版本,因为 32 位版本无法安装在 64 位机器上,反之亦然。如果您不确定您运行的是 32 位还是 64 位版本,或者您在为 Windows 安装时收到错误,请单击此处查看 DraftSight 社区中的支持帖子。

Mac 用户:DraftSight 不支持 Mac 32 位机器。

Linux 用户:DraftSight 不支持 Linux 32 位机器。

相关内容