How to fix this gRPC installation problem? - amazon-web-services

Im following these steps to install gRPC on my freshly launched AWS EC2 Instance:
https://jitpaul.blog/2018/04/18/grpc-on-aws/
When I try to execute this line:
sudo yum install libgflags-dev libgtest-dev
I get this error:
I don't want to mess up anything, please help.

Try instead:
sudo yum install gflags-dev
sudo yum install gtest-dev
That should install libgflags-dev and libgtest-dev.

Related

Uninstalling a package installed with amazon-linux-extras

How do you UNinstall a package installed with amazon-linux-extras??
sudo amazon-linux-extras install postgresql10
Installs it. Now... how do I remove it?
sudo amazon-linux-extras uninstall postgresql10
Nope.
sudo amazon-linux-extras remove postgresql10
Nope.
yum remove postgresql10
Nope.
WTH?
sudo yum remove postgresql
In order to confirm we are removing what we did install with amazon-linux-extras, we can check the Repository after we run the sudo yum remove command:

How to install unavailable python packages in aws ec2

I gonna install pyaudio and sounddevice packages via requirements.txt in EC2.
But it says raise OSError('PortAudio library not found')
So I tried to install libasound-dev for sounddevice...
Yum install libasound-dev
But it also said :
No package libasound-dev available
How should I do? I am in AWS EC2.
libasound-dev is for Ubuntu. For Amazon Linux 2 it should be:
sudo yum install alsa-lib-devel
For portaudio:
sudo amazon-linux-extras install epel -y
sudo yum install -y portaudio-devel portaudio
If you are in Window and gonna use pyaudio, you would use like this:
pip install pipwin
pipwin install pyaudio
This works well on Window.

Can I install tools using yum inside AWS Lambda?

do you know if there exists a way to use yum from inside a Lambda function. For example, I need to install mdbtools, but if in my lambda I write (in Python)
subprocess.run(['yum', 'install', 'mdbtools'])
then it says
[ERROR] FileNotFoundError: [Errno 2] No such file or directory: 'yum'
I also tried with
os.system('yum install mdbtools')
but it says
sh: yum: command not found
Finally, I read from here to enable also the EPEL repository, so I tried with
os.system('sudo amazon-linux-extras install epel -y; sudo yum-config-manager --enable epel; yum install mdbtools')
os.system('sudo amazon-linux-extras install epel -y; sudo yum-config-manager --enable epel; yum install mdbtools')
os.system('sudo amazon-linux-extras install epel -y; sudo yum-config-manager --enable epel; yum install mdbtools')
but again I get
sh: sudo: command not found
sh: sudo: command not found
sh: yum: command not found
Can you help? Thanks in advance.
If yum existed in the Lambda environment, it should be in /bin/yum. I've looked there, and don't see it, so I'm going to assume that you won't be able to run it.
If you need a library that can't be packaged in a deployment bundle, you'll need to use a Lambda Container Image. Start with one of the pre-built base images, and run yum in your Dockerfile.
However, I see that you've tagged this question with ms-access. If you're trying to install a Microsoft product in a the Linix-based Lambda environment, you'll need to do a lot more than just run yum.
This is not how it is intended to work with dependencies in Lambdas.
It can be achieved in another way though.
You should include all the libs and dependencies in your .zip file which you upload. More information on that here.

No folder on ubuntu - clamd.scan/clamd.sock

I am trying to install a scanner for my Django application which refers to this place /var/run/clamd.scan/clamd.sock but I don't have the following folder on ubuntu 18+. I tried to install it using sudo apt-get install clamav but I still have no visible folery. How can I install it on ubuntu? or maybe he is in a different place.
for the server files, you may need to install the daemon:
sudo apt-get install clamav clamav-daemon
sudo service clamav-freshclam restart
sudo service clamav-daemon restart

AWS EC2 instance based on RHEL7.2 ami can not install Docker

I created one EC2 instance that's based on AMI: RHEL-7.2_HVM-20161025-x86_64-1-Hourly2-GP2 - ami-2265c543 , but when I wanna install docker via yum install docker -y it shows me error: No package docker available. Error: Nothing to do . So anyone know how to install docker on this ami OS?
thanks in advance.
You can install Docker-CE by setting up Docker repo.
To do So, you can follow official Documentation (Use Docker EE for RHEL).
Install required packages
sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
Use the following command to set up the stable repository
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
INSTALL DOCKER CE
sudo yum install docker-ce
Start Docker
sudo systemctl start docker
AWS — RHLE7.5 Free Tier with Docker CE
Since docker is considered an “Extra” rpm with RHLE, then let's explain how you can use Centos Docker Community Edition (CE) for RHLE.
The above step of installing helped me to resolve the problem.
Below I am listing steps to install docker-ce on RHEL.
sudo yum install -y yum-utils
sudo yum-config-manager — add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum makecache fast
To avoid error “Requires: container-selinux >= 2.9”
Run following command
sudo yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.42-1.gitad8f0f7.el7.noarch.rpm
To avoid error “libtool-ltdl-2.4.2–22.el7_3.x8 FAILED” Run following command
yum install -y http://mirror.centos.org/centos/7/os/x86_64/Packages/libtool-ltdl-2.4.2-22.el7_3.x86_64.rpm
To avoid Error: Package: docker-ce-18.03.1.ce-1.el7.centos.x86_64 (docker-ce-stable)
Run:
yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/pigz-2.3.3-1.el7.centos.x86_64.rpm
sudo yum -y install docker-ce
Can test the docker running with command: sudo systemctl start docker
To check to see if your service is running you can use:
sudo service docker status