Curl error (77): Problem with the SSL CA cert (path? access rights?) CAfile: /etc/pki/tls/certs/ca-bundle.crt - centos

I mistakenly delete/etc/pki/tls folder to configure openssl1.1 package. I have a machine Centos 8. When I want to install openssl with yum install openssl I have following error because of deleting that directory.
how can I fix it?

You should try to reinstall the ca-certificates first:
sudo yum reinstall ca-certificates
This should fix your /etc/pki/tls folder. After that you should be able to install other packages again.
If you get SSL errors while running the above command, you need to disable SSL verification for yum and try again. This is done by adding sslverify=false in /etc/yum.conf. Remember to delete this line after reinstalling the ca-certificates.

Related

Nginx CentOS 7 yum Install Error

I am trying to install Nginx on centOS 7 but I keep getting this error
[nginx error][1]
[1]: https://i.stack.imgur.com/iwMhQ.png
Things I have tried:
-Yum Clean All
-Installed Epel-release
-Tried to install apt-get,wget, and unzip but receive the same errors
- created a yum repo for nginx with the following:
[nginx]
name=nginx repo
baseurl= ht tp://n ginx.org /packages/centos/7/$basearch/
gpgcheck=0
enabled=1
- sudo yum -y install nginx httpd-tools
- sudo vi /etc/nginx/nginx.conf
If anyone knows how I can get around this or knows an alternate way to install ELK Stack on centos7 that will be greatly appreciated, thanks!
In particular to installing Nginx on CentOS 7, not sure of what kind of error you have (could not open the image/picture from you), but just tried (around 10 minutes ago) on CentOS 7 (Vagrant Box "CentOS-7.2-1.8T"), it worked with the following simple 2 steps:
1. sudo yum -y install epel-release
2. sudo yum -y install nginx
It worked without running "yum clean all" and without creating "/etc/yum.repos.d/nginx.repo".
If httpd-tools is needed, it also worked by adding an extra (separate) command "sudo yum -y install httpd-tools".
Not sure if this is the solution or whether this is helpful enough, but just looking at what you have tried, I just want to share that even simpler steps seem sufficient enough to work.
name=nginx repo -> name=nginx
yum-config-manager --enable nginx
yum install nginx httpd-tools
nginx stable version install on CentOS 8
If you are installing ngnx on centos7,you need to add the repository using epel release. We need to add the repo first then we can start installing .
sudo yum install epel-release
Then we can edit repo
$frugalis vi /etc/yum.repos.d/nginx.repo
Now add the below
[nginx]
name=nginx repo
baseurl=https://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1
This will enable the repo .. For installations on any other OS Versions , you can add repo going to their official website here .Trick is you need to enable the repo based on the versions . Then you can follow next steps like Configuring selinux or enabling firewall.

centos yum fails installing anything or updating system

I am trying to install a package on CentOS, but it throws error when I run the "yum" command. The internet connection is working fine.
I try to yum clean all but problem persist.
Error:
[root#dcos-master3 ~]# yum install ntp
Loaded plugins: fastestmirror
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot find a valid baseurl for repo: base/$releasever/x86_64
My yum repolist is the next:
[root#dcos-master3 ~]# yum repolist list
Loaded plugins: fastestmirror
https://yum.dockerproject.org/repo/main/centos/%24releasever/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/solutions/69319
If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/
repolist: 0
If I list the repolist:
[root#dcos-master3 ~]# yum repolist
Loaded plugins: fastestmirror
https://yum.dockerproject.org/repo/main/centos/%24releasever/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/solutions/69319
If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/
repo id repo name status
base/$releasever/x86_64 CentOS-$releasever - Base 0
dockerrepo/$releasever Docker Repository 0
extras/$releasever/x86_64 CentOS-$releasever - Extras 0
updates/$releasever/x86_64 CentOS-$releasever - Updates 0
repolist: 0
BEFORE TRYING ANY OF THIS, HAVE A BACKUP OF YOUR MACHINE, YOU COULD DAMAGE YOUR OS MORE/COMPLETELY
It seems that your yum variable $releasever is somehow corrupt,
it usually is caused by missing centos-release package on the machine for some obscure reasons.
You can check if you have the package by:
rpm -qi centos-release
You will probably see:
"package centos-release is not installed"
First find out the exact centos version that you have by executing as root:
cat /etc/redhat-release
You will see something like this:
CentOS Linux release 7.3.1611 (Core)
You can fetch the centos-release package from repo by:
wget http://vault.centos.org/centos/7.3.1611/updates/x86_64/Packages/centos-release-7-3.1611.el7.centos.2.5.x86_64.rpm
Now run reinstall centos-release package via rpm:
sudo rpm -Uvh --replacepkgs centos-release-7-3.1611.el7.centos.2.5.x86_64.rpm
As next you can try to install something with yum and you might get:
[root#dcos-master3 ikerlan]# sudo yum install wget
error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db5 - (-30969)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:
Error: rpmdb open failed
Now you can try to reboot the machine or try to use the following command to rebuild the rpm db:
rpm --rebuilddb
I came across the same issue while downloading some packages in centos 7. After days of search, I found the solution:
Go to the yum repo directory.
cd /etc/yum.repos.d.
Make a copy of the CentOS-Base.repo file.
cp CentOS-Base.repo CentOS-Base.repo.old
Edit the CentOS-Base.repo file. Comment mirrorlist and uncomment baseurl.
vi CentOS-Base.repo
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Now when you use yum, do the following.
sudo yum --disablerepo=* --enablerepo=base install httpd
Likewise for yum update.
sudo yum --disablerepo=* --enablerepo=base install httpd
It should work now.
I ran into this problem when attempting to install MariaDB on CentOS 7. I was super frustrated and after much searching found the answer at this link.
Here is what fixed this problem for me. Run as root.
# yum --disablerepo "*" --enablerepo epel install [package]
# yum clean all
"epel" can be whatever repo you like, but this one worked for me. Place [package] in the command just as written, not what package you are trying to install.
After you run the above, exit root and run whatever install you were attempting before encountering the error.
I noticed that in the failing url, your $releasever is %24releasever, but it should be 7 or 7.14.xx. Please check your yum config file at /etc/yum/var, or search in every .repo file, to see what is its value. It may be corrupted.
See Red Hat documentation for more information about how to set these variables.
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/sec-using_yum_variables
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y
yum -y install yum-utils
yum-config-manager --enable remi-php74
Then proceed to your installation/updates/etc
Always make sure NAT is active on your centos7. Specially when there is a VMnet2 for host. Because sometimes VMNet2 can be active instead of NAT and because of that you will not be able to connect to the internet through centos7. This is just a one reason for getting that error.

Unable to install chromium in my centOS7

I have this Unable to install chromium in my centOS problem in Centos7. Suggested solution does not work in 7. It's missing libude.so dependency.
After some try and error I came to simple solution as simple as:
yum install epel-release
yum install chromium
you should add the third yum to your yum repository under the file yum.repos.d,such as epel ,rpmforge.and then goto terminal with command:
yum -y install chromium.x86_64
once compelete,a chromuim browser will display on your application manager,you can click it to open on your Desktop.
also you can use the command chromium-browser on terminal.

How to uninstall "qpid" in centos6.3

I am unable to uninstall qpid from my centos VM.
I have tried following::
-sudo yum erase qpid-cpp-server
-sudo yum remove qpid-cpp-server
But Its not getting uninstall.
The dash before 'sudo' may be preventing the command from being recognized.
Try:
sudo yum remove qpid-cpp-server qpid-tools

Error while installing RPMFORGE in CENTOS 7

When i try to install rpmforge (i need to install phpmyadmin) i get this error, any help would be greatly appreciated!
[root#plasticarmy ~]# yum http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
Loaded plugins: fastestmirror
No such command: http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm. Please use /usr/bin/yum --help
[root#plasticarmy ~]#
Any help would be great!
Close, but you're missing "install" in the above yum command.
First, if you haven't already, import the key ->
sudo rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
Then 'yum install' ->
sudo yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
Try running:
rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
as root and it should work.
I had the same issue, and it was due to the fact that i was installing the wrong package, Note that "rpmforge-release-0.5.3-1" is a 0.5.3-1 release.
When I got the right release "epel-release-7-0.2" which is 7-0.2 as per the command:
sudo rpm -Uvh http://fedora.mirrors.romtelecom.ro/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm
The installation of the package was successful, and I could install phpMyAdmin later.
P.S: my CentOS is 7.