EPEL & Codeready-builder AWS EC2 RHEL8 - r

I am running an EC2 instance with a RHEL8 AMI.
I am looking to install R on the instance and I believe I need the EPEL package and to enable the codeready builder through the following two commands
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf config-manager --set-enabled rhui-codeready-builder-for-rhel-8-rhui-rpms
more info at (https://aws.amazon.com/premiumsupport/knowledge-center/ec2-enable-epel/)
I can download epel (first line) fine but when I run the second line I get the following:
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Error: No matching repo to modify: rhui-codeready-builder-for-rhel-8-rhui-rpms.
Also when I try to run the following, I get the following:
This system has no repositories available through subscriptions.
and for completeness, this is the error when i try to install R
$sudo yum install -y R
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:52:36 ago on Mon 04 May 2020 01:17:58 AM UTC.
Error:
Problem: package R-3.6.3-1.el8.x86_64 requires R-devel = 3.6.3-1.el8, but none of the providers can be installed
- package R-devel-3.6.3-1.el8.x86_64 requires R-core-devel = 3.6.3-1.el8, but none of the providers can be installed
- conflicting requests
- nothing provides openblas-devel needed by R-core-devel-3.6.3-1.el8.x86_64
- nothing provides texinfo-tex needed by R-core-devel-3.6.3-1.el8.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Does anyone have any ideas or has solved this same problem?

I worked this out just after writing it...
For anyones reference, it seems AWS had their command written wrongly.
Still download epel package as shown above
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
and instead of the following from AWS website
sudo dnf config-manager --set-enabled rhui-codeready-builder-for-rhel-8-rhui-rpms
You can use
sudo dnf config-manager --set-enabled codeready-builder-for-rhel-8-rhui-rpms
Then go ahead with sudo yum install -y R

Related

How to install newer version of R on Amazon Linux 2

For whatever reason, Amazon moved R to the so-called "Extras Library" so you can't install R using sudo yum install -y R anymore. Instead, you have to do sudo amazon-linux-extras install R3.4. As a result, I can only install R 3.4.3 when the newest stable release is 3.6.1, and so many R libraries can't even be installed because the version is too low. Is there any good and clean way to install the latest version of R and skip Amazon's package manager? Thanks!
Use amazon-linux-extras which installs R4.0.2:
amazon-linux-extras install R4
You may need root:
sudo amazon-linux-extras install R4
I've tried setting up R 3.6.x on a docker container that uses the amazonlinux image. My approach was to get the R source file from the below link and install from source
cd /tmp/
wget https://cloud.r-project.org/src/base/R-3/R-3.6.3.tar.gz
tar -zxf R-3.6.3.tar.gz
cd /tmp/R-3.6.3
./configure --without-libtiff --without-lapack --without-ICU --disable-R-profiling --disable-nls
make
make install
you will need to yum install some dependencies, like 'make', which doesn't seem to come with aws amazonlinux docker image (which i think mirrors the EC2 instance AMI image you are referring to).
The above kind of worked for me in that i had a working R3.6 installation, but it didnt allow me use it with rshiny server, so i'm reverting to the shipped 3.4.3 version.
tl;dr: you'll probably have to manually download the source files and install the desired R version from source, and throw in some build dependencies as well.
Try this on Amazon Linux 2
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install R
Amazon Linux 2 Image contains extras library that can be used as well. Follow the guide here.
https://aws.amazon.com/premiumsupport/knowledge-center/ec2-install-extras-library-software/
sudo amazon-linux-extras enable R3.4
sudo yum clean metadata && sudo yum install R3.4

How to install MariaDB on RHEL 7 server?

Given cat /etc/yum.repos.d/MariaDB.repo is:
# MariaDB 10.3 RedHat repository list - created 2018-08-29 05:52 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/rhel7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
When I do
sudo yum install MariaDB-server MariaDB-client
I got:
Loaded plugins: search-disabled-repos
No package MariaDB-server available.
* Maybe you meant: mariadb-server
No package MariaDB-client available.
Error: Nothing to do
I'm using https://downloads.mariadb.org/mariadb/repositories/#mirror=digital-pacific&distro=RedHat&distro_release=rhel7-amd64--rhel7&version=10.3
Why am I not able to install mariadb on my RHEL7 server?
Note:
yum list mariadb
Loaded plugins: search-disabled-repos
Available Packages
mariadb.x86_64 1:5.5.60-1.el7_5 uofa_repos
Is this because i'm only looking at uofa_repos repository somehow? How do I install mariadb correctly?
After adding the Repo, as you did, run: (This should force reload the repository)
sudo yum clean all
Then run: (This will list the available repository for MariaDB).
sudo yum list --showduplicates MariaDB-server
This will show something like:
Available Packages
mariadb-server.x86_64
.........
Now pay Attention to the name of the package (sudo yum install is case sensitive) so in this example run:
sudo yum install mariadb-server
(Not MariaDB-server)
If you check the baseurl as given you will notice things are not named as you might expect them to be;
MariaDB-10.3.7-centos73-x86_64-client.rpm
MariaDB-10.3.9-centos73-x86_64-server.rpm
It looks like you should specify something along the lines of yum install MariaDB-10.3.9-centos73-x86_64-<foo> in order to install from that specific repo.
If you got this error: No package MariaDB-server and No package MariaDB-client. Just comment this line in /etc/yum.conf (add # at the beginning...)
#exclude=ansible1.9,mysql,mariadb,mariadb-,Percona-XtraDB-,Percona--55,Percona--56,Percona--51,Percona--50

Installing R packages on Amazon Linux EC2 instance

I am learning to use RSelenium in an EC2 instance, and I found this handy guide on doing so - https://rpubs.com/grahamplace/rselenium-ec2 - however the guide focuses on an Ubuntu instance and I am using an Amazon Linux Instance. In order to install RSelenium, the guide says I must externally (outside of R but ssh'd into my EC2 instance) install the packages xml (XML i think, case sensitive) and RCurl. The guide's relevant lines of code are:
sudo apt-get install r-cran-xml
sudo apt-get install r-cran-RCurl
however, since I'm in an Amazon Linux instance, I tried:
sudo yum install r-cran-xml
sudo yum install r-cran-RCurl
for which I get the following error:
No package r-cran-RCurl available.
Error: Nothing to do
Note: I was successful in installing R on my machine (my instance), and I am able to simply type R to launch R in the EC2 instance.
Note2: install.packages('XML') and install.packages('RCurl') with R launched do not work either.
Any help appreciated with this, thanks!
the amazon linux R package has a different name:
sudo yum install -y R
then you tried (in R) install.packages(c('XML','RCurl')), but the installation failed.
as you discovered and describe in the comment below, you needed to install an additional amazon linux package, libxml2-devel, in order to install.packages('XML') successfully.
this is what I get when I run sudo yum install -y R
No package R available.
Error: Nothing to do
R is available in Amazon Linux Extra topic "R3.4"
To use, run
sudo amazon-linux-extras install R3.4
Learn more at
https://aws.amazon.com/amazon-linux-2/faqs/#Amazon_Linux_Extras

Error with Fiware-Cygnus installation via yum

i am trying to install the Fireware Cygnus via yum
yum install cygnus-ngsi
But in the middle i got some erros.
Transaction Check Error:
file /usr/cygnus/init.d/cygnus from install of cygnus-common-1.2.0-0.gbd4790e.x86_64 conflicts with file from package cygnus-0.13.0-0.g0c6765f.x86_64
-......
i checked the /usr directory but there is nothing with /cygnus/init.d and so on...
It is possible that there have been something before but who knows.
I also tried to clean yum repo but the error still exists. Does anyone have an idea ?
Try the following command in order to remove all Cygnus stuff:
sudo rpm -e -vv --allmatches --nodeps --noscripts --notriggers cygnus
sudo rpm -e -vv --allmatches --nodeps --noscripts --notriggers cygnus-ngsi
The first command will remove everything regarding Cygnus pre release 1.0.0, the second one will remove everything post release 1.0.0.
Hope this helps!
NOTE: from Cygnus 1.0.0 the code was split into cygnus-common, a library of common utils and classes for all Cygnus agents, and cygnus-ngsi, a NGSI specific agent (after that, other contributors have added more agents to Cygnus , such as cygnus-twitter by Universidad Politécnica de Valencia). That's why before release 1.0.0 Cygnus was installed as yum install cygnus and after 1.0.0 it is installed as yum install cygnus-ngsi.

How to install a specific version of nginx on Debian 7?

I did the following to nstall nginx on Debian 7
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install nginx
sudo service nginx start
This installed the latest version of nginx , How do I install another version?
Doing sudo apt-get install nginx=1.2 or sudo apt-get install nginx-1.2 does not work. It fails saying version not found?
Older version of Nginx is not available in Debian repository, you need configure Nginx Debian repository http://nginx.org/en/linux_packages.html or find the deb package and install manually.
A distribution of Debian is a set of software packages that was tested to run well together. Every change imposes a risk to break somethign somewhere since that change may not have been prepared for by another software also installed.
When you are for a newever version than what the distributions ships, then a look at the package "tracker" will present an overview of what is currently available, which includes so-called backports to your distribution: https://packages.qa.debian.org/n/nginx.html but indeed the packages directly provided by nginx.org should be just fine. For looks into the past, check out http://snapshot.debian.org/package/nginx/ .

Resources