Amazon Linux: apt-get: command not found

后端 未结 10 755
闹比i
闹比i 2020-12-22 20:47

I\'m trying to install an apache server on my AWS instance, however, it seems that it doesn\'t have the apt package installed.

I googled and all I found was some bro

相关标签:
10条回答
  • 2020-12-22 21:03

    For openSUSE Linux distribution:

    sudo zypper install <package>
    

    For example:

    sudo zypper install git
    
    0 讨论(0)
  • 2020-12-22 21:04

    There can be 2 issues :=

    1. Your are trying the command in machine that does not support apt-get command
    because apt-get is suitable for Linux based Ubuntu machines; for MAC, try
    apt-get equivalent such as Brew
    
    2. The other issue can be that your installation was not completed properly So
    

    The short answer:

    Re-install Ubuntu from a Live CD or USB.
    

    The long version:

    The long version would be a waste of your time: your system will never
    be clean, but if you insist you could try:
    
    ==> Copying everything (missing) except for the /home folder from the Live
    CD/USB to your HDD.
    
    OR
    
    ==> Do a re-install/repair over the broken system again with the Live
    CD / USB stick.
    
    OR
    
    ==> Download the deb file for apt-get and install as explained on above posts.
    I would definitely go for a fresh new install as there are so many things to
    do and so little time.
    
    0 讨论(0)
  • 2020-12-22 21:05

    Try to install your application by using yum command yum install application_name

    0 讨论(0)
  • 2020-12-22 21:06

    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.

    Note: Amazon Linux 2 has diverged from CentOS since the writing of this answer, but still uses yum.

    0 讨论(0)
提交回复
热议问题