Unable to install openblas-devel on Redhat 7 - redhat

I tried command below
yum install openblas-devel
but the package is not avaialble in using Yum
My Yum.conf is like below
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
[comments abridged]
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
tried solution provided below but still did not work
[root#server ec2-user]# subscription-manager repos --enable rhel-*-optional-rpms \
> --enable rhel-*-extras-rpms \
> --enable rhel-ha-for-rhel-*-server-rpms
Repositories disabled by configuration.
WARNING
The yum/dnf plugins: /etc/yum/pluginconf.d/subscription-manager.conf were automatically enabled for the benefit of Red Hat Subscription Management. If not desired, use "subscription-manager config --rhsm.auto_enable_yum_plugins=0" to block this behavior.
[root#server ec2-user]# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Loaded plugins: amazon-id, product-id, rhui-lb, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
epel-release-latest-7.noarch.rpm | 15 kB 00:00:00
Examining /var/tmp/yum-root-QKKmT8/epel-release-latest-7.noarch.rpm: epel-release-7-14.noarch
/var/tmp/yum-root-QKKmT8/epel-release-latest-7.noarch.rpm: does not update installed package.
Error: Nothing to do
[root#server ec2-user]#

You need to enable EPEL repo, the package is located there.
As described here you can enable it with command:
subscription-manager repos --enable rhel-*-optional-rpms \
--enable rhel-*-extras-rpms \
--enable rhel-ha-for-rhel-*-server-rpms
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Related

yum couln't fund Mariadb Package on CentoOS 7

I tried to install MariaDB
$ sudo yum -y install MariaDB-server MariaDB-client
but yum return error
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.halifax.rwth-aachen.de
* epel: mirror.imt-systems.com
* extras: mirror.imt-systems.com
* remi-php72: mirror.23media.com
* remi-safe: mirror.23media.com
* updates: mirror.alpix.eu
No package MariaDB-server available.
No package MariaDB-client available.
Error: Nothing to do
I also add Mariadb repo in /etc/yum.repos.d/MariaDB.repo
MariaDB.repo is:
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
http://yum.mariadb.org/5.5/centos6-amd64 in .repo is not match with CentOS 7 this instead:
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/centos7-amd64/
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
then:
sudo yum clean all
sudo yum update
sudo yum -y install MariaDB-server MariaDB-client
To match case-sensitive names of servers a.k.a. MariaDB-server not mariadb-server, You must have correct mariadb server repos added. Thus - You will also have latest Maria DB server versions (be careful with this, if not intended).
For Centos 7 version worth using official installation manual - much safer and easy: https://mariadb.com/resources/blog/installing-mariadb-10-on-centos-7-rhel-7/
$ cd ~
$ sudo yum install wget
$ wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
$ chmod +x mariadb_repo_setup
$ sudo ./mariadb_repo_setup
$
$ # Installation
$ sudo yum install MariaDB-server

how to install pg_background extension in postgresql 11

I want execute atomic transaction in PostgreSQL, I found this "https://github.com/vibhorkum/pg_background" link but could not understand the process, can any one explain how to do this installation on a Linux server?
# yum install postgresql12-devel
# yum install curl-devel expat-devel gettext-devel \
openssl-devel zlib-devel
# git clone https://github.com/vibhorkum/pg_background.git
# export PATH=$PATH:/usr/pgsql-12/bin
# cd /pg_background
# make
# make install
# sudo -iu postgres psql
postgres # CREATE EXTENSION pg_background;

Setting up Django with GeoDjango Support in AWS Beanstalk or EC2 Instance

So I have at one point had this going via Beanstalk, using Amazon Instance (2013.09) ami-35792c5c . At the time this ebextension scripts worked great when placed in the root of your repo in .ebextensions/
00_repo.config
packages:
rpm:
pgdg-redhat93-9.3-1: 'http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-redhat93-9.3-1.noarch.rpm'
remi: 'http://rpms.famillecollet.com/enterprise/remi-release-6.rpm'
files:
"/etc/yum.repos.d/pgdg-93-redhat.repo":
mode: "000644"
owner: root
group: root
content: |
[pgdg93]
name=PostgreSQL 9.3 $releasever - $basearch
baseurl=http://yum.postgresql.org/9.3/redhat/rhel-6-$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-93
[pgdg93-source]
name=PostgreSQL 9.3 $releasever - $basearch - Source
failovermethod=priority
baseurl=http://yum.postgresql.org/srpms/9.3/redhat/rhel-6-$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-93
commands:
epel_repo:
command: yum-config-manager -y --enable epel
remi_repo:
command: yum-config-manager -y --enable remi
01_app.config
packages:
yum:
libtiff-devel: ''
libjpeg-devel: ''
libzip-devel: ''
freetype-devel: ''
postgresql-devel: ''
gdal: ''
gdal-python: ''
geos: ''
proj: ''
libmemcached: ''
libmemcached-devel: ''
cyrus-sasl-devel: ''
zlib-devel: ''
container_commands:
01_collectstatic:
command: 'PYTHONPATH=.:..:../lib cd site/kpmkhv && ./manage.py collectstatic -c --noinput && cd ../..'
leader_only: true
02_syncdb:
command: 'PYTHONPATH=.:..:../lib cd site/kpmkhv && ./manage.py syncdb --noinput && cd ../..'
leader_only: true
03_migrate:
command: 'PYTHONPATH=.:..:../lib cd site/kpmkhv && ./manage.py migrate --noinput && cd ../..'
leader_only: true
option_settings:
- namespace: aws:elasticbeanstalk:container:python
option_name: WSGIPath
value: site/kpmkhv/wsgi.py
- namespace: aws:elasticbeanstalk:container:python:staticfiles
option_name: /static/
value: site/kpmkhv/static/
- option_name: DJANGO_SETTINGS_MODULE
value: settings_prod
So now when I use the same instance and launch my environment, I get this error regarding a dependency.
Error: Package: gdal-libs-1.9.2-5.rhel6.x86_64 (pgdg93)
Requires: libpoppler.so.5()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Looks like the same repo is now returning a newer version of poppler, it was 12.x and now its 22.x and gdal needs the old version.
I also tested this out on an EC2 Instance and got the same error. But then I ran into this document from amazon on locking an AMI to its original repository version.
So adding this to User Options via the EC2 Console when you launch fixes the problem on EC2:
#cloud-config
repo_releasever: 2014.03
What is the best way to always have this option when your Beanstalk launches the EC2 Instance on your behalf? I read about cloud-init and perhaps a script deployed via ebextensions would be the best bet?
Any insight on this is appreciated, thanks.
My solution to a 2017.03 image was to:
commands:
01_yum_update:
command: sudo yum -y update
02_epel_repo:
command: sudo yum-config-manager -y --enable epel
03_install_gdal_packages:
command: sudo yum -y install gdal gdal-devel
files:
"/etc/httpd/conf.d/wsgihacks.conf":
mode: "000644"
owner: root
group: root
content: |
WSGIPassAuthorization On
packages:
yum:
git: []
postgresql95-devel: []
gettext: []
libjpeg-turbo-devel: []
libffi-devel: []
So I now have a working ebextensions workflow on 2013.09 stack ami ami-35792c5c. For the 2014.09 stack see the other solution. The solution below works with postgis by installing the needed gdal component, 00_repo.config needs to look like this:
files:
"/etc/yum.repos.d/pgdg-93-redhat.repo":
mode: "000644"
owner: root
group: root
content: |
[pgdg93]
name=PostgreSQL 9.3 $releasever - $basearch
baseurl=http://yum.postgresql.org/9.3/redhat/rhel-6-$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-93
[pgdg93-source]
name=PostgreSQL 9.3 $releasever - $basearch - Source
failovermethod=priority
baseurl=http://yum.postgresql.org/srpms/9.3/redhat/rhel-6-$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-93
commands:
epel_repo:
command: yum-config-manager -y --enable epel
remi_repo:
command: yum-config-manager -y --enable remi
packages:
rpm:
pgdg-redhat93-9.3-1: 'http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-redhat93-9.3-1.noarch.rpm'
remi: 'http://rpms.famillecollet.com/enterprise/remi-release-6.rpm'
qt4-devel: 'http://mirror.centos.org/centos/6/os/x86_64/Packages/qt-4.6.2-28.el6_5.x86_64.rpm'
The 2nd extension stays in tact. This works on Amazon Instance (2013.09) ami-35792c5c, I haven't tried the newer containers yet with it.
Alternative 1:
If you want less dependencies on repos / rpms from the ebextensions file, you could upload all required rpms to S3 and update the ebextensions 'packages' to point to your s3 rpms. Setup your S3 bucket for public get access using CORS headers.
Alternative 2:
Create a custom AMI where you compile all dependencies from source. This way there will be no rpm conflicts and you don't have to temper with the default repos supplied by the AMI you are customizing. See this answer:
Configuring Amazon Elastic Beanstalk with PostGIS
Also check out the tool I made:
https://github.com/radlws/django-awseb-tasks
I had a similar issue on the 2014.09 stack, ami id ami-246ed34c and got around the problem like this:
I found and downloaded the required dependencies online here and here. These are the versions that work:
lib64jpeg8-8b-5.1.mga1.x86_64.rpm
lib64poppler5-0.12.4-2.1mdv2010.1.x86_64.rpm
Zipped both .rpm files
Uploaded the .zip files to S3 and make sure the server can access them.
Added to ebextensions/00_sources.config the following code:
/etc/mylibs/jpeg8/ : https://s3.amazonaws.com/path-to-first-rpm-file.rpm.zip
/etc/mylibs/poppler/ : https://s3.amazonaws.com/path-to-second-rpm-file.rpm.zip
Installed via yum in ebextensions/01_packages.config. I had to use these commands to be able to install them.
commands:
jpeg8_repo:
command: yum -y install /etc/mylibs/jpeg8/lib64jpeg8-8b-5.1.mga1.x86_64.rpm
ignoreErrors: true
poppler_repo:
command: yum -y install /etc/mylibs/poppler/lib64poppler5-0.12.4-2.1mdv2010.1.x86_64.rpm
ignoreErrors: true
I was finally able to get this to work on the 2015.03 image and PostgreSQL 9.4 with a suggestion I found on the PostgreSQL yum mailing list (http://www.postgresql.org/message-id/1429688221.3808.17.camel#gunduz.org)
Specifically, I installed libpoppler straight from a CentOS 6 mirror. I also used Mike Edward's suggestion of the Amazon Linux specific pgdg rpm. In whole, it ended up being a rather simple solution, which looked like:
yum -y install http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-ami201503-94-9.4-1.noarch.rpm
yum --enablerepo=epel -y install postgis2_94 http://centos-distro.cavecreek.net/centos/6.6/os/x86_64/Packages/poppler-0.12.4-3.el6_0.1.x86_64.rpm
For the 2015.03 image, I had good luck using this value for the pgdg repo:
pgdg-redhat93-9.3-1: 'http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-ami201503-93-9.3-1.noarch.rpm'
With that, I was able to install gdal without needing to bring in libpoppler, etc., as separate rpms from S3.

Install ack-grep on CentOS

I went through fair amount of google search to install ack-grep on CentOS but I didn't find anything help. I also looked for the source codes but couldn't find it neither. Does anyone know how to install it on the OS?
Thanks a lot.
Could be essentially the same as https://stackoverflow.com/a/23155007/35946 but on CentOS 6.7 the answer is:
# yum install epel-release
# yum install ack
if you don't have the root permission, you can do as follows:
$ curl https://beyondgrep.com/ack-2.22-single-file > ~/bin/ack && chmod 0755 !#:3
or you can change to root user:
$ sudo su
# curl https://beyondgrep.com/ack-2.22-single-file > /bin/ack && chmod 0755 !#:3
You can get it from the EPEL software repository.
From the EPEL FAQ:
For EL5:
su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
...
su -c 'yum install ack'
For EL6:
su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm'
...
su -c 'yum install ack'
Go to Beyond Grep and look at the section titled
Install The ack executeable
curl http://beyondgrep.com/ack-2.14-single-file > ~/bin/ack && chmod 0755 !#:3
And replace ack.2.14 with the current version of ack.
You may need to create the directory mkdir ~/bin/ first. You may
also need to modify ~/.bashrc to include this new path E.G.:
PATH=$PATH:$HOME/bin
Then reload ~/.bashrc
source ~/.bashrc
Test the installation by running ack:
rpm -qa | ack s
This should display any installed packages containing the letter s. (some linux distributions may use ack-grep as the command.
How did you try installing it? Are you using yum? The package is probably not called "ack-grep", but just "ack".
The name "ack-grep" is a Debian-specific thing because there was already a package called "ack", so they called it "ack-grep" instead. That was years ago and now they're dropping the original "ack" package and renaming "ack-grep" to "ack".
For RedHat Enterprise just do sudo yum install ack

How to programmatically install the latest epel-release rpm, without knowing its version number?

My first post here, but I googled around and cannot find a simple way to do this.
I have a program which automatically configures new CentOS Linux servers as they come online. As part of the process it installs the latest version of epel-release rpm.
The command I use looks like this:
$ rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm && \
yum clean all
This works great... until they change the rpm file to epel-release-6-8.noarch, then epel-release-6-9.noarch, and so on. They seem to update the version every 3-4 months. This is a problem, because if the repository updates the epel-release version number, my scripts will fail because it has no idea what that version should be.
I failed to find a link that might redirect to the latest epel rpm file, so I have no choice but to hard-code the version into my install scripts, and change it when they fail.
Anyone know a simple (non-hard-coded) way to download the latest epel rpm without knowing the version number? I'm hoping for a way that does not involve dong a curl on the repo file list and grep'ing the url, but curious what anyone might suggest?
The following script will do the trick:
cat <<EOM >/etc/yum.repos.d/epel-bootstrap.repo
[epel]
name=Bootstrap EPEL
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-\$releasever&arch=\$basearch
failovermethod=priority
enabled=0
gpgcheck=0
EOM
yum --enablerepo=epel -y install epel-release
rm -f /etc/yum.repos.d/epel-bootstrap.repo
It should work on RHEL/CentOS 5 and 6. I didn't test version 4.
The EPEL project has recently implemented "latest" symlinks for the epel-release package.
https://dl.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm
​https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
See https://fedorahosted.org/epel/ticket/8#comment:12
Do it right from the shell:
$ EPEL_BASEURL=http://dl.fedoraproject.org/pub/epel/$(awk '/rhel/ {print $2}' /etc/rpm/macros.dist)/$(uname -p)/
$ rpm -ivh $EPEL_BASEURL$(curl -s $EPEL_BASEURL | grep epel-release | awk -F'<|>' '{print $5}')
Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
warning: /var/tmp/rpm-tmp.zRXE1U: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]
I've tested this on CentOS 6.4, 6.5 and 6.6 and RHEL 6.5 and 6.6, but the contents of /etc/rpm/macros.dist and the HTML code from http://dl.fedoraproject.org should be consistent on all platforms, so this should work on all platforms.
For posterity's sake, here it is with more detail:
$ EPEL_BASEURL=http://dl.fedoraproject.org/pub/epel/$(awk '/rhel/ {print $2}' /etc/rpm/macros.dist)/$(uname -p)/
# http://dl.fedoraproject.org/pub/epel/6/x86_64/
$ EPEL_RELEASE_RPM=$(curl -s $EPEL_BASEURL | grep epel-release | awk -F'<|>' '{print $5}')
# epel-release-6-8.noarch.rpm
$ EPEL_RELEASE_RPMURL=$EPEL_BASEURL$EPEL_RELEASE_RPM
# http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ rpm -ivh $EPEL_RELEASE_RPMURL
Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
warning: /var/tmp/rpm-tmp.ep6xy3: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]