Amazon Linux:apt-get:找不到命令 [英] Amazon Linux: apt-get: command not found
问题描述
我正在尝试在我的 AWS 实例上安装 apache 服务器,但是,它似乎没有安装 apt 包.
I'm trying to install an apache server on my AWS instance, however, it seems that it doesn't have the apt package installed.
我用谷歌搜索,我发现的只是这个包的一些损坏的链接.如果该信息有帮助,我将在 Windows 机器上使用 Putty.
I googled and all I found was some broken links to this package. I am using Putty on a windows machine if that information helps.
我目前在 Linux 环境方面的经验很少甚至没有.
I currently have low to none experience in linux enviroments.
我正在运行以下版本的 Linux
I am running the following version of Linux
Linux ip-172-31-37-96 3.14.48-33.39.amzn1.x86_64 #1 SMP Tue Jul 14 23:43:07 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
有人可以帮忙吗?
推荐答案
如果您使用的是 Amazon Linux,它是基于 CentOS 的,也就是基于 RedHat 的.基于 RH 的安装使用 yum
而不是 apt-get
.yum search httpd
之类的应该向您显示可用的 Apache 包 - 您可能想要 yum install httpd24
.
If you're using Amazon Linux it's CentOS-based, which is RedHat-based. RH-based installs use yum
not apt-get
. Something like yum search httpd
should show you the available Apache packages - you likely want yum install httpd24
.
注意:Amazon Linux 2 与 CentOS 不同 自从写了这个答案,但仍然使用 yum
.
Note: Amazon Linux 2 has diverged from CentOS since the writing of this answer, but still uses
yum
.
这篇关于Amazon Linux:apt-get:找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!