7

I'm a new user of Amazon EC2.

I want to compile the pptpd package on EC2, but receive the following error:

[root@ip-10-112-xxx-xxx /]# /var/tmp/rpm-tmp.2eILT0: line 58: /usr/bin/make: No such file or directory

I searched the entire root directory tree, but make isn't available:

[root@ip-10-112-59-187 /]# find . -name "make"
./etc/mail/make

I'm wondering whether make is actually installed on the Amazon Linux AMI initially? If not, how do I install it?

Steffen Opel
  • 63,899
  • 11
  • 192
  • 211
ciphor
  • 8,018
  • 11
  • 53
  • 70

3 Answers3

10

Preface

The Amazon Linux AMI is (loosely) based on CentOS and a perfectly decent OS for EC2, in fact it has been tailored by Amazon for EC2 specifically:

The Amazon Linux AMI is a supported and maintained Linux image provided by Amazon Web Services for use on Amazon Elastic Compute Cloud (Amazon EC2). It is designed to provide a stable, secure, and high performance execution environment for applications running on Amazon EC2. It also includes packages that enable easy integration with AWS, [...]. Amazon Web Services provides ongoing security and maintenance updates to all instances running the Amazon Linux AMI. [...] [emphasis mine]

However, it is indeed not as widely used yet as some other distributions, with the most popular likely being Ubuntu due to its popularity in general and its dedicated long time tailored support of EC2 in particular (see e.g. the EC2StartersGuide, the Ubuntu Cloud Images or the convenient listing of the Ubuntu AMIs for Amazon EC2 on alestic). This yields two drawbacks:

  • You'll find much more examples/tutorials/etc. for EC2 based on Ubuntu, making things easier eventually.
  • You'll find slightly less precompiled packages available for CentOS, requiring compiling your own eventually (but see below).

Solution

That said, CentOS (and the Amazon Linux AMI in turn) uses the Yum package manager to install and update packages from CentOS (and 3rd party) Repositories (Debian/Ubuntu use the APT package manager instead - the inherent concepts are very similar though), see e.g. section Adding Packages in Amazon Linux AMI Basics:

In addition to the packages included in the Amazon Linux AMI, Amazon provides a yum repository consisting of common Linux applications for use inside of Amazon EC2. The Amazon Linux AMI is configured to point to this repository by default for all yum actions. The packages can be installed by issuing yum commands. For example:

# sudo yum install httpd

Accordingly, you can install make via yum install make (you can get a listing of all readily available packages via yum list all).

Be advised though, that you might actually not need to do that, insofar the Amazon Linux AMI has been built to be binary-compatible with the CentOS series of releases, and therefore packages built to run on CentOS should also run on the Amazon Linux AMI. [emphasis mine]

The desired package pptpd is not part of the standard repositories on CentOS either though, but it is available in the 3rd party Extra Packages for Enterprise Linux (EPEL) repository (see Letter P) - I can't comment on the viability of using this one vs. compiling your own though.

Good luck!

Community
  • 1
  • 1
Steffen Opel
  • 63,899
  • 11
  • 192
  • 211
  • 1
    I've not found any package that doesn't work yet as long as you make sure to get the right version of the software and all the dependencies. I believe that Amazon Linux is now compatible with CentOS 6. – bwight Mar 03 '12 at 17:47
  • @bwight: Thanks for the additional information, I wasn't sure about the CentOS 6 compatibility indeed (unfortunately the `pptpd` package seems not to be available for CentOS 6 yet though). – Steffen Opel Mar 03 '12 at 17:51
  • I read somewhere that this was the case, I will have to look around and see if i can find any proof of this. I know that about 6 months ago the documentation specifically said CentOS 5.5. – bwight Mar 03 '12 at 17:55
  • 2
    Looking at /etc/yum.repos.d./epel.repo you can see that they're loading the URL for EPEL6 which to me makes me think that its now CentOS 6 instead of 5.5 I could be wrong. – bwight Mar 03 '12 at 18:03
  • @bwight: Sounds reasonable, good to know - thanks for digging it up! – Steffen Opel Mar 03 '12 at 18:19
7

Make is not installed by default on Amazon Linux AMIs. However, you can install it quite easily with yum. If you choose to only install make, you might get some errors later for other packages in the compilation process. If you are going to compile software, you might want to just install all of the development tools at once.

sudo yum groupinstall "Development Tools"
Eric N
  • 353
  • 3
  • 7
1
sudo yum groupinstall "Development Tools"

According to the documentation: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/compile-software.html

geisterfurz007
  • 5,292
  • 5
  • 33
  • 54
Marcel Bezerra
  • 161
  • 1
  • 9
  • 1
    Stackoverflow is an English Q&A site. Please write your posts accordingly. I have edited your answer to translated in English and include the English link to the docs you linked. – geisterfurz007 Jul 20 '18 at 09:12