Enable EPEL repository in CentOS 7 - linux

I tried to enabled my EPEL repository in my CentOS system because some packages were not available in the official CentOS 7 repository.
I followed this tutorial:
http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/
and followed RHEL/CentOS 7 64 Bit part.
I tried
RHEL/CentOS 7 64-Bit
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
rpm -ivh epel-release-7-5.noarch.rpm
But I get this error:
resolving dl.fedoraproject.org (dl.fedoraproject.org)... failed: Name or service not known.
wget: unable to resolve host address dl.fedoraproject.org
Do any of you know how to fix this?
I tried googling it but did not point me to the right answer.

As mentioned in "Is there any reason for a successful yum update to cause a subsequent wget to fail?", you might want to try:
sudo yum update
sudo wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

Take a look in the comment of chicks (https://stackoverflow.com/users/2002471). For me this was the answer I was looking for:
yum install epel-release
The links to fedora seem to change time by time. I found links to epel-release-7-5, others to epel-release-7, current (2/2018) seems to be epel-release-7-9.

Related

openSUSE 15.4 zypper error installing postgreSQL

I am new to Linux,
I installed openSUSE Leap 15.4, and made the root directory ext4, I then followed these steps to install postgreSQL 13 on my system
1.sudo zypper ref && sudo zypper update
sudo zypper addrepo https://download.postgresql.org/pub/repos/zypp/repo/pgdg-sles-15-pg13.repo
But after this, I sudo zypper ref again and it shows an error saying:
Retrieving repository 'PostgreSQL 13 SLES 15.4 - x86_64' metadata .....................................[error]
Repository 'PostgreSQL 13 SLES 15.4 - x86_64' is invalid.
[pgdg-13|https://download.postgresql.org/pub/repos/zypp/13/suse/sles-15.4-x86_64] Valid metadata not found at specified URL
History:
- [pgdg-13|https://download.postgresql.org/pub/repos/zypp/13/suse/sles-15.4-x86_64] Repository type can't be determined.
what can I do to install postgreSQL
I can't say precisely why your zypper command failed, but it might have to do with the fact that the repositories from your link are intended for SUSE Linux Enterprise 15 SP4, not for openSUSE Leap 15.4, which is what you're using. So even if you did get these repositories to work, you might run into other compatibility problems later.
To install postgresql, there is always the option to search for your package on software.opensuse.org. (I strongly recommend you bookmark this page – it's the place to look for openSUSE packages.) For postgresql13, there is indeed an official experimental package available for openSUSE 15.4, namely here, which you can install via 1-Click-Install. However, the newer version postgresql14 is already out for quite a while, so I would only advise for using the older postgresql13 if you have a very strong reason to do so. The newer postgresql14 also has an official experimental package available for openSUSE 15.4, namely here; this is the one I would recommend currently.
first check if repo is enabled zypper repos -d
check /etc/zypp/repos.d/pgdg-13.repo file
If you open the added repo file all set sles. but i think the main problem is the type=rpm-md. In any case you dont need add third part repo to install postgress. the package is already in the main repos and is called postgresql-server.
So remove the https://download.postgresql.org/pub/repos/zypp/repo/pgdg-sles-15-pg13.repo to prevent any other issues and package conflicts
zypper lr # to list the repos and find the number for the `https://download.postgresql.org/pub/repos/zypp/repo/pgdg-sles-15-pg13.repo`
zypper rr <number>
Then just install postgresql-server
Btw when you refresh the packages you dont need to run update

Unable to install PostgreSQL 9.5/PostGIS 2.3 on CentOS 7

On my CentOS 7 (x86_64) machine, I am trying to install PostgreSQL 9.5/PostGIS 2.3 via PostgreSQL's yum repository, using this tutorial.
According to the tutorial, when I proceed to the second step.
sudo rpm -ivh http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm
It says:
Retrieving http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm
Preparing... ################################# [100%]
package pgdg-centos95-9.5-3.noarch (which is newer than pgdg-centos95-9.5-2.noarch) is already installed
Then, I try to see which packages are available in this rpm:
sudo yum list | grep pgdg95
I get,
libevent.x86_64 2.0.22-1.rhel7 #pgdg95
python-babel.noarch 1.3-1.rhel7 #pgdg95
python-jinja2.noarch 2.8-7.rhel7 #pgdg95
python-markupsafe.x86_64 0.23-11.rhel7 #pgdg95
Which is not according to the step number 3 in the installation tutorial. Can someone please suggest me what's wrong with the installation or are there any alternative ways to install PostgreSQL 9.5/PostGIS 2.3?
Please make sure you have both pgdg and EPEL repositories installed by running sudo yum repolist. If EPEL is not in the list, just install it sudo yum install epel-release.
Please refer to this ANSWER.
Check yum list postgres*
If you see desired packages it is great.
If you still don't see desired packages then follow given steps in given answer,
# vi /etc/yum.repos.d/CentOS-Base.repo
# yum localinstall http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm
# yum list postgres*
If you check step two, we can see it does local install after this local installation, you should be ideally able to see desired list.
Hope it helps !

How to resolve dependencies while installing application on linux (CentOS 7.1)

When I tried install deluge on my CentOS 7.1 I was facing dependecy problems due to some el6 which are not meant for CentOS 7.1. So, I found this page:
https://gist.github.com/dasgoll/111f6f3364e2ab97bc08
His instructions:
Centos 7.1
yum -y install wget wget hxxp://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
rpm -ivh nux-dextop-release-0-5.el7.nux.noarch.rpm
yum -y install deluge-web
systemctl start deluge-web
systemctl stop firewalld
browse http://192.168.3.101:8112
check it
yum install deluge-console
And my question is: Why he installed "nux-dextop-release-0-5.el7.nux.noarch.rpm" from li.nux.ro (if I'm not wrong it's a repository, correct me if I'm)? Because I had this dependency problem earlier when I tried installing deluge. But when I used his instructions it resolved all the dependencies automatically for me. So does this rpm file he installed on the first place was for resolving dependencies? If not then how can one work around with dependencies while installing a piece of software/application. Than You in advance.
P.S. I asked the same question in comments there too. But I'm uncertain of receiving reply there (no offence for the guy/girl - dasgoll).
Third party package repos will often use a *-release package to contain both a yum repo definition and a rpm signing public key so that end users can install packages directly from the repo using yum instead of having to find and then download them one by one.

Cannot install jpegoptim on Centos 6

I am trying to install jpegoptim on a CentOS 6 server. I have downloaded and unpacked the package but when I try to run ./configure from the jpegoptim-1.3.0 directory I get an error that says:
"cannot find libjpeg or you have too old version (v6 or later required)."
I have checked and I have libjpeg-turbo install, which should supercede libjpeg. I have not been able to find anything on the net about this issue. What am I doing wrong?
Thanks,
Rob
The configure script is looking for jpeglib.h which is in the libjpeg-turbo-devel package.
You may want to use yum to help you with what you are looking for. The following may get you what you need:
yum search libjpeg
yum install libjpeg*
Note I have the epel repository installed on my system too. So if the above don't give you what you want, you may need to install the epel repository first.

Linux Yum Fatal Python error: pycurl: libcurl link-time version is older than compile-time version

So this error is driving me crazy, I've search the web multiple times, ran a few things and no results. I get the following error when using yum.
[root#texas pycurl-7.19.0]# yum update
Fatal Python error: pycurl: libcurl link-time version is older than compile-timeversion
Aborted
[root#texas pycurl-7.19.0]# rpm -qa | grep pycurl
python-pycurl-7.19.0-8.el6.i686
[root#texas pycurl-7.19.0]# rpm -qa | grep curl
curl-7.19.7-26.el6_2.4.i686
libcurl-7.19.7-26.el6_2.4.i686
python-pycurl-7.19.0-8.el6.i686
[root#texas pycurl-7.19.0]#
[root#texas /]# locate libcurl.so
/usr/lib/libcurl.so
/usr/lib/libcurl.so.4
/usr/lib/libcurl.so.4.1.1
[root#texas /]# locate pycurl
/usr/lib/python2.6/site-packages/pycurl-7.19.0-py2.6.egg-info
/usr/lib/python2.6/site-packages/pycurl.so
/usr/share/doc/python-pycurl-7.19.0
I've recompiled my directadmin build with curl and no change after that either. (I already had directadmin with curl working fine before)
Any help is appreciated.
I have found that VMWare Toolkit caused this issue on CentOS VMs.
vi /etc/ld.so.conf.d/vmware-tools-libraries.conf
and add the following two lines at the top (assuming you're 64-bit):
/lib64
/usr/lib64
Save, and "ldconfig".
I just had the same issue. Someone just played with LD_LIBRARY_PATH.
unset LD_LIBRARY_PATH; yum update
or
LD_LIBRARY_PATH='' yum update
does the trick for me.
I just had the same problem after having added a bunch of libraries to the ldconfig path. (I needed to install the RPostgreSQL in my local R install, and was missing libpq.so and some others; I happened to have a package that had all that --and more-- and simply added the libs of that package via ldconfig; that royally screwed up yum and pycurl etc.)
So, I just selected the minimal set of libs I wanted and added them to some place in /usr/local/lib/rpostgresql-depend, then added that via ldconfig. Now both that RPostgreSQL package in R and yum work.
Your problem might be a variation of this.
My error is very simple.
remove /usr/local/curl/lib/ from /etc/ld.so.conf then it's ok.
Reached here from google. So just for future viewers, if I use yum without root permission, I was getting this error. Using sudo yum fixed it. I am using CentOS 7.9.2009.

Resources