how to install amazon-linux-extras on EC2 Ubuntu 18.0 - amazon-web-services

I tried sudo apt-get amazon-linux-extras
It is ubuntu, so I don't have yum on the machine and I can't find the repo to download amazon-linux-extras
EDIT
I am trying to run make to build cpp code base and I get following error
/bin/sh: 2: autoreconf: not found

Related

how to install a package in running vm instance in GCP

while we have connect to compute engine and ssh to one of the engine
when we try to run below command
sudo apt-get packagename
error: -bash: apt: command not found
is there any way to install in the running instance
You should have chosen an Ubuntu image, when expecting apt-get to function.
The command is probably sudo dnf install - that's depending on the image.

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.

How to fix this gRPC installation problem?

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.

Unable to install pip

I tried installing pip in the following different ways and didn't have any success, any guidance how can I install pip ?
username#machine ~]$ sudo /usr/local/bin/easy_install pip
[sudo] password for username:
Searching for pip
Reading http://pypi.python.org/simple/pip/
Couldn't find index page for 'pip' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for pip
error: Could not find suitable distribution for Requirement.parse('pip')
[username#machine ~]$ sudo /usr/local/bin/easy_install-2.7 pip
Searching for pip
Reading http://pypi.python.org/simple/pip/
Couldn't find index page for 'pip' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for pip
error: Could not find suitable distribution for Requirement.parse('pip')
[username#machine ~]$ python -m pip
/usr/local/bin/python: No module named pip
[username#machine ~]$ sudo apt-get install python-pip
sudo: apt-get: command not found
[username#machine ~]$ sudo yum install python-pip
Loaded plugins: security
Setting up Install Process
No package python-pip available.
Error: Nothing to do
Machine configuration:
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: OracleServer
Description: Oracle Linux Server release 6.6
Release: 6.6
Codename: n/a
You can try to use the following for python2.7:
sudo apt install python-pip
And if you alternatively want to install on python3:
sudo apt install python3-pip
None of the above worked, I had to do the following for OL7, as per the official docs:
yum install -y oracle-epel-release-el7 oracle-release-el7

not able to install contextBroker via yum on CentOs7

HI everybody i am using CentOs7 and havae some troubles with the installation of the contextBroker. I followed the installation on the added the Fiware Repo in my yum repo.
Here is a list of my yum repo:
repo id repo name status
base/7/x86_64 CentOS-7 - Base 9,007
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 10,368
extras/7/x86_64 CentOS-7 - Extras 356
fiware Fiware Repository 176
mongodb MongoDB repo 279
updates/7/x86_64 CentOS-7 - Updates 2,070
repolist: 22,256
I am always getting an error message that there are some failed dependencies
libboost_filesystem-mt.so.5()(64bit) is needed by contextBroker-0.15.0-1.x86_64
libboost_system-mt.so.5()(64bit) is needed by contextBroker-0.15.0-1.x86_64
libboost_thread-mt.so.5()(64bit) is needed by contextBroker-0.15.0-1.x86_64
Here is the output of my config file for the fiware.repo
[fiware]
name=Fiware Repository
#baseurl=http://repositories.lab.fiware.org/repo/rpm/$releasever
baseurl=http://repositories.lab.fiware.org/repo/rpm/x86_64/
gpgcheck=0
enabled=1
I found a possible solution under this link, but unfortunately this is not working. In the comment section there is an entry which says that there is a problem with CentOs7 but that doesn`t solve my problem
Btw: this is also not working Boost-Libboost is needed in Centos7 (ContexBroker)
So my question is, did someone installed the contextBroker on CentOs7 via yum and if he/she did how can i solve this problem ?
As you mention, there isn't official support for CentOS 7 at the present moment. However, you could do the following to get a running binary with contextBroker in your CentOS 7 system (actually, this a "quick and dirty" receipt based on the build from sources procedure documented in the Orion manual):
sudo yum install git wget
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -i epel-release-latest-7.noarch.rpm
sudo yum install make cmake gcc-c++ scons
sudo yum install boost-devel libcurl-devel gnutls-devel libgcrypt-devel libuuid-devel
# Install mongoDB driver as described in the documentation
# Install rapidjson as described in the documentation
# Install libmicrohttpd as described in the documentation
mkdir ~/src
cd ~/src
git clone https://github.com/telefonicaid/fiware-orion.git
cd fiware-orion
# optionally, you can set an specific version with a checkout command
# e.g. 'git checkout 1.2.1'. Otherwise, you will build the latest
# code from develop branch
make
BUILD_RELEASE/src/app/contextBroker/contextBroker --version
Moreover, you can use the following to generate a RPM file:
sudo yum install rpm-build
make rpm
# The RPM is generated in rpm/RPMS/x86_64/contextBroker-1.2.0_next-dev.x86_64.rpm
# (version number may vary)
That RPM file is supposed to work in other CentOS 7 systems and you can install just using sudo yum install /path/to/contextBroker-1.2.0_next-dev.x86_64.rpm.