Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts
Friday, 21 October 2016
Installing IDL v7.1 on Kubuntu 16.04 (on MacBook pro)
The IDL installation went smooth as usual, but when I tried to run IDL, there was an error:
error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
In the IDL help pages ( IDL fails to install on Linux: What to do, scroll down to the Ubuntu section) there is a comment on that that turned only half useful. Two libraries I got installed with no problem:
sudo apt-get install libxmu-dev
sudo apt-get install libxmu6
but the other three were not found in repositories. Instead of manual installation (two of them are available from http://packages.ubuntu.com/xenial/, but the last one is a bit mysterious. Google finds it only in three pages related to IDL, one of them being the previously mentioned page from the IDL docs). Instead, I got if from Git. As I have just installed Kubuntu there was still some important packages missing, so some of the following steps may be redundant for you.
sudo apt-get install autoconf autogen intltool
sudo apt-get install git
sudo apt-get install xutils-dev libtool libx11-dev
x11proto-xext-dev x11proto-print-dev
git clone https://cgit.freedesktop.org/xorg/lib/libXp/
Then cd to libXp directory and execute
sudo ./autogen.sh
In my case if was complaining about the line 18214 related to XPRINT. I commented out that line from the script and executed it again. After that everything is straight forward:
sudo ./configure
sudo make install
And finally I add the path to the library to .bashrc (all in one line):
echo 'export LD_LIBRARY_PATH="/usr/local/lib/:$LD_LIBRARY_PATH"' >> ~/.bashrc
After that IDL worked normally.
Sunday, 21 August 2011
Check the endianness of your Linux machine
There is a very simple way to check the endianness of your Linux machine. Just type:
printf '\1' | od -dAn
If the answer is 1, then your machine is little endian. If 256, it is big endian.
Thursday, 11 August 2011
Loosless ps-to-pdf conversion in Linux
The easiest way to do convert your eps/ps figures to pdf in Linux (without a quality loss) is to use epstopdf script. It calls ghostview with several compression options as default and it's not possible to change that just from the command line. The quick solution is to change epstopdf itself. It is usually located in /usr/bin/ directory. Line
should be changed to
After the change is made, you can convert your eps to pdf with
$GSOPTS = "-dUseFlateCompression=false " unless $::opt_compress;
should be changed to
$GSOPTS = "-dUseFlateCompression=false -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode " unless $::opt_compress;
After the change is made, you can convert your eps to pdf with
epstopdf --nocompress file.eps
Subscribe to:
Posts (Atom)