I installed on CentOS 7 awscli using this command:
yum install awscli
But it turned out that it is old version of awscli:
awscli.noarch 1.14.28-5.el7_5.1
How could I update or install using yum on CentOS 7 to get awscli 1.18?
AWS documentation here clearly mentions as below. Looks like it is not recommended to use the yum appraoch.
Although the awscli package is available in repositories for other package managers such as apt and yum, these are not produced, managed, or supported by AWS. We recommend that you install the AWS CLI from only the official AWS distribution points, as documented in this guide.
Related
I'm trying to install php 8.1 on a Graviton 2 (ARM64) EC2 instance thats running Amazon Linux 2.
All of the guides I've followed use remi-release-7.rpm. When I use this repository, yum updates are flooded with 404 errors like
http://rpms.remirepo.net/enterprise/7/safe/aarch64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Is there a relatively easy way to install PHP 8.1 on this type of instance?
You can build it from source. I was able to install it on Amazon Linux 2 on Graviton (aarch64, 5.10 kernel) using the steps below. Be sure to update the url in the wget command to the latest available version or what ever you want to build.
sudo yum -y groupinstall "Development Tools" "Development Libraries"
sudo yum -y install libxml2-devel sqlite-devel
wget https://www.php.net/distributions/php-8.1.5.tar.xz
tar -xf php-8.1.5.tar.xz
cd php-8.1.5/
./configure
make -j$(nproc)
sudo make -j$(nproc) install
Alternatively, you could just use a container. You can get one from Amazon ECR here: https://gallery.ecr.aws/docker/library/php
docker pull public.ecr.aws/docker/library/php:8.1-rc-apache-bullseye
Amazon Linux 2 now has built-in support for PHP 8.1 including ARM!
https://repost.aws/questions/QUsfhDbww4SAy8i5Jmd4vcMg/amazon-linux-2-amazon-linux-extras-php-8-1-support
I have installed the AWS CLI around 6 moths back and upgraded using the following command today.
pip install --upgrade awscli
The current version on my Ubuntu 18.04 machine is:
aws-cli/1.14.44 Python/3.6.5 Linux/4.15.0-23-generic botocore/1.8.48
When I try aws eks command, I am getting the following error:
Invalid choice: 'eks', maybe you meant:
* es
Is my aws cli is upgraded properly or should I install something else for EKS service?
I had the same issue on El Capitan 10.11.6 and the only one worked solution was this:
sudo pip install awscli --ignore-installed six
Version 6 comes with distutils in El Capitan
Reference: https://github.com/aws/aws-cli#installation
Solutions mentioned did not resolve my issue - this link helped me out in figuring the issue.
aws --version
displayed a version which was not the latest. EKS was introduced with version 1.15.32 - which means my version did not know EKS at all. Uninstalling and reinstalling did not work either, path was referring to some older version previously installed somewhere else. The solution was following installation instructions here followed by updating the path variable
the issue cannot be resolved until the
aws --version command shows you any version less than 1.15.32.
The other solutions may be additional fixes needed afterwards, yet they will not work with an earlier version either.
Please check with the AWS region you configured for the AWS CLI you installed.
AWS EKS is available only on US East (N. Virginia) and US West (Oregon).
Do check it properly and configure the same for AWS CLI.
I faced the same issue because my current aws cli version was old (as shown below)
$aws --version
aws-cli/1.14.44 Python/3.6.8 Linux/4.15.0-58-generic botocore/1.8.4
Upgrading the awscli version helped to resolve the issue
$pip3 install --upgrade --user awscli
$aws --version
aws-cli/1.16.252 Python/3.6.8 Linux/4.15.0-58-generic botocore/1.12.242
Here is the link to upgrade awscli
https://docs.aws.amazon.com/cli/latest/userguide/install-linux-al2017.html
I was trying to connect to the cluster from a diff aws profile. So ideally we should use the same IAM profile for running kubectl from local so that the heptio-authenticator-aws will be happy.
This happens when we install aws-cli using apt packages as below.
sudo apt-get install awscli
because by default it will install 1.14 aws-cli version. Therefore my recommendation is to use pip3 to install aws-cli to your machine. It always installs the latest aws-cli version.
pip3 install --upgrade --user awscli
All this not worked for you then
pip uninstall awscli
sudo rm -rf /usr/local/aws
pip3 install awscli --upgrade --user
aws --version
aws-cli/1.18.39 Python/3.6.9 Linux/4.15.0-1065-aws botocore/1.15.39
if this is older version(aws-cli/1.18.39) then it won't work for you
Using the command line, I have installed PHP 7.0 on the Amazon Linux AMI.
However, I am unable to install the PHP Zip Module using the command
sudo yum install php7.0-zip
I get the response
No package php7.0.zip available.
I am excited to start using PHP7 on all my PHP websites, but am a little confused why I am unable to install this particular module. Any help would be much appreciated!
Welp,
After trying several variations of the same command...
sudo yum install php7.0-zip
sudo yum install php7-zip
THIS ONE WORKS
sudo yum install php70-zip
I haven't seen any yum packages for php 7.2 on AWS EC2 and the release has been out over a month.
I have tried yum list | grep php7 and only able see php70 and php71 packages.
Has anyone installed php72 on AWS EC2?
Is there another yum repo to connect to?
Does AWS have a delivery scheduled?
Although the #amzn-main repo doesn't have PHP 7.2 yet (as far as I know), you can use remi-php72. According to his release blog you can install the EPEL and Remi repositories via:
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
wget http://rpms.remirepo.net/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6.rpm
rpm -Uvh epel-release-latest-6.noarch.rpm
And then enable remi-php72 using yum-config-manager:
yum install yum-utils
yum-config-manager --enable remi-php72
After that, you can simply search and install php and all the needed extensions like normal:
sudo yum install --disablerepo="*" --enablerepo="remi,remi-php72" php php-fpm php-cli ...
As #Typel says in a comment on the other answer - if you're using Amazon Linux 2 AMI then
sudo amazon-linux-extras install -y php7.2
Beats installing multiple external repos and has most of th basics, including mariadb and vim (everything I need to feel happy!).
See the list: sudo amazon-linux-extras list
Most PHP vital libraries have been mandating PHP7.1 in their releases lately and I happen to have an API staged on AWS elastic beanstalk PHP7.0 platform that I'd like to make compliant with this recent change.
Seeing as Amazon has greatly delayed this shift since December 1, 2016 release of PHP7.1, I've tried so many things to make PHP7.1 available on this AWS Elastic beanstalk platform originally intended for PHP7.0
Below is my sample upgrade script:
sudo su
yum -y remove php70
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm
yum-config-manager --enable remi-php71
wget ftp://195.220.108.108/linux/epel/6/x86_64/scl-utils-20120229-1.el6.x86_64.rpm
rpm -Uvh scl-utils-20120229-1.el6.x86_64.rpm
yum -y install php71
source /opt/remi/php71/enable
yum -y install php71-php-soap php71-php-bcmath php71-php-devel php-71-php-intl php71-php-mbstring php71-php-mcrypt php71-php-mysqlnd php71-php-opcache php71-php-pgsql php71-php-odbc php71-php-pecl-uuid php71-php-pecl-memcache php71-php-igbinary php71-php-oauth php71-php-xml php71-php-xmlrpc php71-php-process php71-php-apcu
But unless I run the source /opt/remi/php71/enable every time, I can't seem to get PHP71 by default as the PHP cli runtime.
In a bid to fix that, I did yum remove php70* to clean up the old PHP7.0 installation but that led to a problem with the AWS EBS deployment hook scripts.
Right now, I'm in a fix and it seems like I have to be forced to work with PHP7.0 and downgrade most of my PHP libraries. I just want to know if anyone can get me out of this messed up state.
Thank you.
Remi repository provides 2 way to install PHP 7.1
base packages (php-*) 1 repository by version, single version allowed, so you need remi-php71 repository enabled
SCL packages (php71-php-*) designed for parallel installation in remi-safe repository (which you have installed)
As explain in the FAQ.
Also see the Wizard instructions.
Amazon released a new version of Elastic beanstalk with PHP 7.1 support.
Upgrade your environment to use this configuration.