Reputation: 628
I have a server running on AWS Linux. The application uses poppler-utils.
The server is CI integrated. So all the necessary dependencies are installed before the application is deployed. One of the dependencies is poppler-utils
.
Till now I had been installing it using $ yum install poppler-utils
. Recently I realized that the version on Amazon Linux repo hasn't been updated for ages (0.26.5 vs latest on ubuntu is 20.08 - 6 years of version difference).
I can of course build and install (using make
and make install
on source) on a single machine. For CI/CD purposes I need something that is fast to install and deploy (yum packages work great for this).
How can I get ready to deploy recent version of poppler-utils?
Few Ideas I have explored:
Looking for some direction on which path to pursue.
Upvotes: 1
Views: 3222
Reputation: 14591
I managed to install pdftoppm
successfully by executing these commands:
sudo yum update
sudo yum install poppler-data
sudo yum install poppler-utils
After this the command worked:
pdftoppm --help
Here are some details of my Amazon Linux version:
$ cat /etc/os-release
NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
HOME_URL="https://aws.amazon.com/linux/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023"
SUPPORT_END="2028-03-15"
Upvotes: 0
Reputation: 628
Thanks a lot @marcin and @zethw for the answers.
I went with AMI + build poppler
from scratch approach. High-level steps are:
Create an Instance suitable for creating AMI. In my case, I was using elastic beanstalk for my application. Hence, the instance had to be created from elasticbeanstalk AMI
Connect to that AMI and build poppler
. You'll notice you need to do a lot of library dance on this one. But in the end, ensure $ pdftoppm --help
returns proper output (as a way to test).
Create an AMI from the instance you've been using in Step 2.
It sounds straightforward but you'll have to deal with a few issues:
poppler
, the cmake command with prompting you for missing libraries. This may vary from Amazon Linux 1 to 2 and your setup.Word of Advice
I would say @zethw's answer is more sustainable in long term. Or else consider moving out of Amazon Linux if you have the luxury.
Upvotes: 0
Reputation: 238051
Based on the comments.
The solution proposed was to build custom AMI:
You can launch an instance from an existing AMI, customize the instance (for example, install software on the instance), and then save this updated configuration as a custom AMI. Instances launched from this new custom AMI include the customizations that you made when you created the AMI.
Thus the AMI was creating with current version of poppler-utils, which ensures that any instance launched from the AMI will have up-to-date poppler.
Upvotes: 2
Reputation: 363
I spent about three days on this issue. Turns out that the Amazon Linux OS is essentially CentOS7 and it looks like 0.26.5 (Sep 2014) is the last version available for CentOS7, 0.66.0 (June 2018) for CentOS8, and 20.11.0 (Nov 2020) for CentOS8 Stream according to https://pkgs.org/download/poppler-utils 21.03 is the latest (March 2021)
I tried, unsuccessfully, to build my own versions of the libraries through a bunch of http://www.linuxfromscratch.org articles and a lot of prereqs. The biggest issue that I've been finding is that the version that I build is not being used and the version that was installed via yum is, so there are a bunch of version dependencies that I've been trying to address that are not being recognized. I don't want to mess with yum and screw everything else up.
So I've gone down the path of Docker...one of those things that I know that I should have learned but never got around to it. It is the perfect solution. I built my docker off Installing Poppler utils of version 0.82 in docker with the versions updated to the most recent.
Once you build the Dockerfile, create an AMI so you have a starting point and don't have to wait for everything to download and build again.
Upvotes: 1