Enable the EPEL repository on AWS Elastic Beanstalk
5,283
extending Brian's comment - something like this in your .config
packages:
yum:
git: []
postgresql93-devel : []
geos: []
commands:
01_gdal:
command: "yum --enablerepo=epel -y install gdal"
Related videos on Youtube
Author by
lime
Updated on September 18, 2022Comments
-
lime almost 2 years
I need to install some tools from the Extra Packages for Enterprise Linux repository (EPEL) that are not available in the default repositories of the Amazon Linux AMI.
/etc/yum.repos.d/epel.repo
already contains the needed repository, but it is disabled. This is mentioned by Amazon in their FAQ.Can I enable this repo (i.e. change
enabled=0
toenabled=1
) from a configuration file in my.ebextensions
directory or similar? Not surprisingly, I need the change to persist between different instances and environments, so changing it manually is not enough.-
Michael Hampton almost 10 yearsI'm very surprised that they have that in there at all. EPEL is not guaranteed to be compatible with Amazon Linux, and for many packages it is not.
-
lime almost 10 yearsGood point, and obviously I will have to tread carefully. :) Luckily in my case, the tools are non-essential and I can leave out those that happen to be incompatible.
-
Brian almost 10 yearsYou can enable a repo for only the current command,
yum --enablerepo=epel install some-package
. This requires no changes to the system and doesn't leave a repository enabled that might latter cause problems. -
Jordan Reiter about 8 years@MichaelHampton I believe support for EPEL may have changed. In any case, I've installed git dozens of times on EC2 instances and never ran into the problem you linked to. So I would imagine that there is another reason for the error.
-
-
danieljimenez over 7 yearsNot quite, packages are executed before commands, so this would fail.
-
JDiMatteo about 6 years@danieljimenez no, this would not necessarily fail; this .config results in installing a single package (gdal) from epel. If the rest of the packages may be installed without epel then the order doesn't matter. This answer is the simplest if you just want to install a single package from epel.