gpt4 book ai didi

amazon-ec2 - 如何在 Amazon Linux AMI for EC2 上使用/安装 "make"?

转载 作者:行者123 更新时间:2023-12-03 11:18:31 28 4
gpt4 key购买 nike

我是 Amazon EC2 的新用户。

我要编译pptpd在 EC2 上打包,但收到以下错误:

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

我搜索了整个根目录树,但 make不可用:

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

我想知道是否 make实际上最初安装在 Amazon Linux AMI 上?如果没有,我该如何安装?

最佳答案

前言
Amazon Linux AMI(松散地)基于 CentOS 和一个完美的 EC2 操作系统,实际上它是由亚马逊专门为 EC2 量身定制的:

The Amazon Linux AMI is a supported and maintained Linux imageprovided by Amazon Web Services for use on Amazon Elastic ComputeCloud (Amazon EC2). It is designed to provide a stable, secure, andhigh performance execution environment for applications running onAmazon EC2. It also includes packages that enable easy integrationwith AWS, [...]. Amazon Web Services provides ongoing security andmaintenance updates to all instances running the Amazon Linux AMI. [...] [emphasis mine]


然而,它确实不像其他一些发行版那样被广泛使用,最流行的可能是 Ubuntu,因为它普遍受欢迎,特别是它对 EC2 的长期定制支持(参见例如 EC2StartersGuideUbuntu Cloud Images 或方便的在 alestic 上列出了适用于 Amazon EC2 的 Ubuntu AMI)。这会产生两个缺点:
  • 你会发现更多的例子/教程/等。对于基于 Ubuntu 的 EC2,最终使事情变得更容易。
  • 您会发现可用于 CentOS 的预编译软件包略少,最终需要编译您自己的软件包(但请参见下文)。

  • 解决方案
    也就是说,CentOS(以及 Amazon Linux AMI)使用 Yum 包管理器来安装和更新来自 CentOS(和第 3 方)存储库的包(Debian/Ubuntu 使用 APT 包管理器来代替——但内在的概念非常相似) ,见例如在 Amazon Linux AMI Basics 添加包部分:

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

    # sudo yum install httpd


    因此,您可以通过 yum install make 安装 make(您可以通过 yum list all 获得所有可用软件包的列表)。
    不过请注意,您实际上可能不需要这样做,因为 Amazon Linux AMI 已构建为与 CentOS 系列发行版二进制兼容,因此为在 CentOS 上运行而构建的 包也应在 Amazon Linux 上运行AMI 。 [强调我的]
    所需的软件包 pptpd 也不是 CentOS 上标准存储库的一部分,但它在第 3 方 Extra Packages for Enterprise Linux (EPEL) 存储库中可用(请参阅 Letter P )-我无法评论使用此软件包与编译自己的软件包的可行性。
    祝你好运!

    关于amazon-ec2 - 如何在 Amazon Linux AMI for EC2 上使用/安装 "make"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9544200/

    28 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com