Ubuntu: Problem with pdf file opening in terminal



Question:

when i tried to open a pdf file in terminal using xpdf i get segmentation fault error. how do I solve this?

here is the command and error message:

xpdf 320Lecture10.pdf   ***** MediaBox = ll:0,0 ur:612,792  ***** CropBox = ll:0,0 ur:612,792  ***** Rotate = 0  Segmentation fault (core dumped)  


Solution:1

This is a reported bug on https://bugs.launchpad.net/ubuntu/+source/xpdf/+bug/1056361.

Anyway, you can try this method to solve your problem. In terminal run the following commands:

sudo apt-get install libfreetype6-dev libmotif-dev  wget ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.03.tar.gz  tar xzpf xpdf-3.03.tar.gz  cd xpdf-3.03  ./configure -with-freetype2-library=/usr/lib/i386-linux-gnu -with-freetype2-includes=/usr/include/freetype2 -with-Xm-library=/usr/lib -with-Xm-includes=/usr/include/Xm  make  sudo make install  

Source: http://linuxtricksandubuntraps.tumblr.com/post/45909461325/ubuntu-segmentation-fault-when-xpdf-is-launched


Solution:2

The previous answer does not provide all the libraries that an average user might need to get xpdf to compile. The general way is

sudo apt-get build-dep xpdf  

Also you will need to update the version of xpdf from foolabs to 3.04, or whatever their latest version is. I got a working version of xpdf after doing this.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »