Draftsight on Ubuntu 14.04 (32 Bit Os)

I have Ubuntu 14.04 LTS (Os type 32bit) on an AMD 64 X2. I would like to install Draftsight but it appears to be quite impossible: first it says that have the wrong architecture software version (i have installed all the i386 packages), but in the end it gives me always the error

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

Is it possible to install such a software on 32bit Ubuntu and AMD?

Is there any version of the software compatible with my configuration? do I have to download an older version?

Thanks a lot,

mattia

1

3 Answers

Would it be possible to install a 64-bit OS instead, or is that not supported by your hardware? In Linux, 64-bit is "normal" and most programs are designed for 64-bit first.

I've managed to install and run the 64bit new DraftSight in a 32bit Ubuntu system (of course, on 64bit processor). With no (or very few) dirty hacks.

Summary

  1. The key to the solution is the ability to install and run an amd64 kernel in i386 Ubuntu system by adding the amd64 repository as a source for packages.
  2. Then installing the 64bit .deb must have been a straightforward thing to do. Still, there was a problem that the installation script of the package required an additional prerequisite amd64 library to be able to run. (It was not forced by the dependencies of the package.)

    • Solution: apt-get install libgtk2.0-0:amd64.
  3. Then, the installed executable DraftSight didn't run because some amd64 libraries were still missing (also not correctly reflected by the formal dependencies of the package.) First, it couldn't link to a missing dynamic library (.so);

    • Solution: apt-get install libgl1-mesa-glx:amd64

    second, it refused to run reporting that some of the plugins couldn't be loaded. Installing some amd64 packages ultimately did the trick; and it runs now.

    • Solution:

    • 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 / (Actually, apt-get install overlay-scrollbar-gtk2:amd64 works nicely in 15.10 (Wily), no need for the dirty hack!)
    • (maybe optional) apt-get install libgstreamer0.10-0:amd64 gstreamer0.10-plugins-base:amd64 libnss-mdns:amd64 libodbc1:amd64 libgnomeui-0:amd64 libmng2:amd64

I did the experiment on 15.04 (Vivid)/i386 and with the last draftSight.deb whose version is reported by dpkg as follows:

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

1. using an amd64 kernel

That's basically a matter of:

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

and reboot into the new kernel. (Of course, you should have a fallback i386 kernel of another version already installed and tested to be safe.)

(I learned this was possible thanks to the advice at . In general, this works well: on one computer of mine, without any problems at all. Another computer with a different hardware boots in unstable manner however -- .)

You may install a specific linux-image-extra-...-generic package instead of the last command above (which would pull less dependencies). (In my case, I'm using linux-image-extra-3.19.0-28-generic.)

This is possible if your CPU is 64bit.

2. installing draftSight.deb

To install the draftSight.deb and rely on the APT machinery to pull all the dependencies, I used the simple tool gdebi (Ubuntu's standard "software center" is suited for this task this equally well theoretically), which I had discovered thanks to Is it safe to use gdebi instead of Ubuntu Software Center to install .deb files?, gdebi vs dpkg : How does gdebi automatically gets missing dependancies ? Can I use gdebi for all other installations of .deb packages?.

There was a problem with a requirement of the installation script, however:

# 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/ 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
#

So, let's look for the required, but missing libgtk-x11-2.0.so.0 (presumably, 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.
# 

After this, the installation did succeed.

3. Making it run

It was too early to celebrate a success.

DraftSight appeared in the menu, but it didn't start. So I wanted to run it from the command line. It's not in the path. (Now I think that perhaps it added the path to the system bash_profile or the like, but I didn't relogin to get the new environment variable.) Let's search for its executable:

$ 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
$

and run it, and see the errors:

$ /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
$

Actually, it turned out that there are no PATH settings, so I did:

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

a missing amd64 library which is linked to

Again, looking for a missing amd64 library:

$ 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
$

and installing it:

# 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.
#
Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.