libpcre.so.0 missing on AWS AMI - amazon-web-services

I recently installed PostgreSQL Server at my AWS AMI EC2 instance.
I used this answer to guide me through the right RPM package.
Everything is working fine, however, now when I try to install Postgis with sudo yum install postgis23_95.x86_64 I receive:
Error: Package: postgis23_95-2.3.7-1.rhel6.x86_64 (pgdg95)
Requires: libpcre.so.0()(64bit)
I cannot manage to fix this error. I also tried sudo yum install pcre-tools.x86_64, but nothing changed.

Related

Issue in the installation of the AWS CodeDeploy Agent in EC2 instance with AMI - Ubuntu Server 22.04 LTS

I have created an Amazon EC2 instance with AMI - Ubuntu Server 22.04 LTS (Free Tier) and try to install AWS CodeDeploy Agent into it.
I am following the official documentation from Amazon to install CodeDeploy agent into the Ubuntu server.Documentation Link
I have connected the EC2 instance with SSH Keypairs and run the following commands:
sudo apt update
sudo apt install ruby-full
sudo apt install wget
wget https://aws-codedeploy-ap-south-1.s3.ap-south-1.amazonaws.com/latest/install
chmod +x ./install
sudo ./install auto
In the last command, I got the following error message:
`I, [2022-11-25T20:22:45.262298 #4303] INFO -- : Starting Ruby version check.
E, [2022-11-25T20:22:45.262740 #4303] ERROR -- : Current running Ruby version for root is 3.0.2, but Ruby version 2.x needs to be installed.
E, [2022-11-25T20:22:45.262959 #4303] ERROR -- : If you already have the proper Ruby version installed, please either create a symlink to /usr/bin/ruby2.x,
E, [2022-11-25T20:22:45.263173 #4303] ERROR -- : or run this install script with right interpreter. Otherwise please install Ruby 2.x for root user.
E, [2022-11-25T20:22:45.263378 #4303] ERROR -- : You can get more information by running the script with --help option.`
Please let me know if there is any other hacks, I should employ to install AWS CodeDeploy agent in the EC2 instance with with AMI - Ubuntu Server 22.04 LTS (Free Tier).
Thanks in advance!!

Add centos repository to Amazon Linux instance

I'm trying to add the following yum repository to my AWS instance:
https://centos.pkgs.org/7/centos-x86_64/
The issue is that there is no repodata/ directory with the required metadata in this source, how can I add this repository without getting the following error:
yum-config-manager --add-repo https://centos.pkgs.org/7/centos-x86_64/
yum install -y katello
https://centos.pkgs.org/7/centos-x86_64/repodata/repomd.xml: [Errno 12] Timeout on
https://centos.pkgs.org/7/centos-x86_64/repodata/repomd.xml: (28, 'Connection timed out
after 5001 milliseconds')
I'm currently missing multiple dependencies like python-rhsm and selinux-policy which both only exist on the centos.pkgs repository.
Your URL is wrong, the following worked for me:
RUN curl http://mirror.centos.org/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7 -o RPM-GPG-KEY-CentOS-7
RUN rpm --import RPM-GPG-KEY-CentOS-7
RUN yum-config-manager --add-repo='http://mirror.centos.org/centos/7/os/x86_64/'
Note that a lot of their packages will conflict with Amazon's pre-installed packages.
One workaround I've found is to not add that repo, and instead use yum install <direct_rpm_link> for all of my installations. I had to manually resolve some dependencies myself by adding more .rpm links, but at least it worked in the end.

eks option is not available in AWS CLI. How to install it?

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

need help to install php 7.2 yum packages on aws ec2

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

php56-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64 when installing phpmyadmin

I have successfully installed php70 and mysql. But when i am trying to install phpmyadmin by
$ sudo yum-config-manager --enable epel
And Then
$ sudo yum install -y phpMyAdmin
It gives me
--> Finished Dependency Resolution
Error: php70-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64
Error: php56-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Also after google sometimes i found a solution that try this
sudo yum install php70-mbstring
And i have tried this also, Still facing same error.
Any suggestion...?
I guess that you are following the Amazon tutorial to install phpMyAdmin ?
I had the same problem today and resolved it by uninstall PHP 7.0 with the yum command (the same given by Amazon with 'remove' instead of 'install' :
sudo yum remove httpd24 php70 mysql56-server php70-mysqlnd
and installed PHP 5.6 instead :
sudo yum install httpd24 php56 mysql56-server php56-mysqlnd
I don't know if this is a good solution, but it worked and I could install phpMyAdmin without dependencies problem. I hope it will help :)
In case you want to keep php7, I found a solution with AWS Amazon experts.
Just use :
sudo yum install -y php70-mbstring
I was having the same issue today. I had some success downloading phpmyadmin from phpmyadmin.net, and following their instructions. I did run into a different problem during the setup of phpmyadmin....
So, I punted on resolving this with the Amazon AMI for now, and chose to install the Bitnami LAMP AMI to get me going quicker. It comes with phpmyadmin configured.
NOTE: Bitnami's AMI is running PHP Version 5.6.29, so I would say it's valid to follow the previous post's advice and downgrade, unless your web application specifically needs PHP 7.0.