How to install the latest version of poppler?
Solution 1
You've actually fallen in famous X-Y problem loop.
You don't need latest Evince to open password protected pdf. You can just install Foxit reader and make it default PDF viewer. It will gracefully open those pdf.
Download the Foxit reader from here https://www.foxitsoftware.com/downloads/ and install it by double clicking. If that doesn't seem to work, it might be missing executable permission. give it using chmod +x foxitreader.run
like command
Anyway, here are some interesting readings on X-Y problem
Solution 2
To be able to open password-protected pdfs with Evince on my own system I found (after much testing) that I had to compile the latest release of Poppler from source and also compile the latest release of Evince, building it against the newer Poppler.
How to upgrade Poppler & Evince to fix problems opening password-protected PDF files
First install all these prerequisites for compiling:
sudo apt install g++ autoconf libfontconfig1-dev pkg-config libjpeg-dev libopenjpeg-dev gnome-common libglib2.0-dev gtk-doc-tools libyelp-dev yelp-tools gobject-introspection libsecret-1-dev libnautilus-extension-dev
(more dependencies may be found on other systems but I'm working from a 2-week old installation, so hopefully this will be enough for most)
Poppler
Open a terminal so you are in your home directory. If you are really keen on tidiness, you can make a new directory for the two source directories you are going to end up with, for example mkdir poppler
and enter it: cd poppler
.
First download the encoding files (no need to compile these) to the current working directory
wget https://poppler.freedesktop.org/poppler-data-0.4.7.tar.gz
Extract (it does untar cleanly):
tar -xf poppler-data-0.4.7.tar.gz
Enter the directory
cd poppler-data-0.4.7
And magically send the files to the right locations in /usr/share
with:
sudo make install
Now go back up one level
cd ..
Download & extract the main package:
wget https://poppler.freedesktop.org/poppler-0.44.0.tar.xz
tar -xf poppler-0.44.0.tar.xz
cd poppler-0.44.0
Now run the configure
file like this:
./configure --enable-poppler-glib
Here you will get errors if I missed anything from my list of dependencies above. The errors might be illuminating eg 'thing-you-need not found' in which case you can try sudo apt install thing-you-need
and try again. If that doesn't work, try searching online for the error message.
If it exits without errors you can run:
make
Which will take a while. When it's done, you can use sudo make install
but even better, you can use checkinstall to make this installation known to dpkg
(yay!) so:
sudo apt install checkinstall
sudo checkinstall
If you ever want to uninstall this, you can conveniently do so with sudo dpkg -r poppler
as checkinstall
will politely inform you. If you use sudo make install
you can still uninstall at any time by entering the source directory (so keep it!) and typing sudo make uninstall
Evince
We've already got the dependencies for Evince, so assuming you are still in the poppler directory go back up to home with cd
or to wherever you want to download Evince.
wget http://ftp.gnome.org/pub/GNOME/sources/evince/3.20/evince-3.20.0.tar.xz
tar -xf evince-3.20.0.tar.xz
cd evince-3.20.0
./configure
make
sudo checkinstall
Solution 3
sudo apt-get install python-poppler
Related videos on Youtube
Phil
Updated on September 18, 2022Comments
-
Phil almost 2 years
I am using Ubuntu 16.04 and it does not have the latest version of poppler.
This is blocking me from opening important documents that are password protected. I need the latest version to do my day-to-day stuff. Please explain in easy terms as I'm a Linux newbie.
Can someone either tell me how to upgrade manually or get this included as an update?
-
Knud Larsen about 8 yearspoppler-0.43 is still considered a development version .... and who knows when anybody will use "0.44" ? The Ubuntu / Debian development versions have come as far as version 0.41 ! (See Ubuntu yakkety) -
-
-
Phil about 8 yearsThank you, I've done this but I still can't open the pdf with evince. I type in the right pass and it asks me again. (it's definitely the right password)
-
Phil about 8 yearsThanks Bob, I've done this too but still same result (refer to my comment to Greg)
-
Phil almost 8 yearsThanks I can open my encrypted pdfs now, problem is I need another package to actually decrypt the file. I can't do this with foxit.
-
Anwar almost 8 yearsThe types of pdfs you said are normally can be opened with adobe readers latest edition. mupdf also can open it. foxit also. but evince cannot.
-
Alok Nayak almost 7 yearsuse " ./configure --enable-poppler-glib --prefix=/usr". so that you won't need to set up some environment variables later
-
Gaurav Agarwal over 6 yearsI tried installer poppler 0.62 on Ubuntu 14.04 getting this error - bash: ./configure: No such file or directory
-
Yan King Yin almost 6 yearsThanks!! I have a problem with Evince placing annotations in the wrong positions, but after this install the problem seems to be fixed.