Installing a local repo in RHEL - redhat

i found that error during my installation of a local repo in RHEL pay attention that cdrom's contents don't have neither BaseOS , AppStream nor Package directories which should be mounted under it so what should i do ? , every time i install a package like system-config-kickstart as an example an err appears :
Errors during downloading metadata for repository 'Rhel.8.0_BaseOS': - Curl error (37): Couldn't read a file:// file
for file:///rhel.8_dvd/BaseOS/repodata/repomd.xml [Couldn't open file
/rhel.8_dvd/BaseOS/repodata/repomd.xml] Error: Failed to download
metadata for repo 'Rhel.8.0_BaseOS': Cannot download repomd.xml:
Cannot download repodata/repomd.xml: All mirrors were tried

Related

Failed to download metadata for repo appstream

Running on centos 8 today want to install new package and before it wants to run:
yum update -y
but got this:
Failed to download metadata for repo 'appstream': Cannot prepare
internal mirrorlist: No URLs in mirrorlist
Then I did search and found a solution to fix it:
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
I did this but still error persist, any idea? how to fix this? Is there new solution in 2022?
After use this solution
Now error:
Errors during downloading metadata for repository 'extras':
Status code: 403 for https://vault.centos.org/centos/8/extras/x86_64/os/repodata/repomd.xml
(IP: 13.249.9.66) Error: Failed to download metadata for repo
'extras': Cannot download repomd.xml: Cannot download
repodata/repomd.xml: All mirrors were tried

Files list file for package 'git' contains empty filename error

I have a Raspberry Pi 4 running Raspian Lite Version 10. So I far I have installed git, Apache, php, and phpmyadmin on it.
Now while trying to install python3-venv package (or any package for that matter) using sudo apt-get install python3-venv I am getting following error -
Selecting previously unselected package python-pip-whl. dpkg: unrecoverable fatal error, aborting: files list file for package 'git' contains empty filename E: Sub-process /usr/bin/dpkg returned an error code (2)
I am not able to install any package on my system due to this error. So far I tried deleting the git folder from /usr/bin/dpkg but it has not seemed to help.

Couldn't open file /packages/repodata/repomd.xml

I am using Redhat Linux server and trying to install the MongoDB on it.
I am following steps given in the link: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/
Step 1: Create a /etc/yum.repos.d/mongodb-org-4.0.repo file so that you can install MongoDB directly, using yum.
sudo nano /etc/yum.repos.d/mongodb-org-4.0.repo
Step 2: Copy and paste below code in the newly created file.
[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
Step 3: To install a specific release of MongoDB, specify each component package individually and append the version number to the package name, as in the following example:
sudo yum install -y mongodb-org
After all this I am getting an error given below:
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
file:///packages/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /packages/repodata/repomd.xml"
Trying other mirror.`
One of the configured repositories failed (local),
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=localrepo ...
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 localrepo
or
subscription-manager repos --disable=localrepo
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=localrepo.skip_if_unavailable=true
failure: repodata/repomd.xml from localrepo: [Errno 256] No more mirrors to try.
file:///packages/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /packages/repodata/repomd.xml"
Server OS
NAME="Red Hat Enterprise Linux Server"
VERSION="7.3 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="7.3"
PRETTY_NAME="Red Hat Enterprise Linux"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.3:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.3
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.3"
I already followed steps below but these are not working in my case:
sudo rm -rf /etc/yum.repos.d/mongodb-org-4.0.repo
sudo yum clean all
How could i resolve this error?
Based on your error message it looks like you had a nameserver problem, which can involve a variety of solutions as this answer from redhat.com describes. My mongodb-org-4.0.repo file looks just like yours except with version 4.4 and everything worked fine. Well not at first that's how I found this post, but my problem was a blank space I accidentally inserted at the end of the mongodb-org-4.4.repo file.
I found this Unix & Linux Stack Exchange post with some possible fixes, one of which is updating to the latest CentOS. This ServerFault post also had an Errno 14 error message like you're seeing, but this solution was to disable SELinux.
you should check with baseurl in /etc/yum.repos.d/mongodb-org-4.0.repo file. we can also change the releaseserver version in baseurl.
Here is my /etc/yum.repos.d/mongodb-org-4.0.repo file
[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
It works for me.

Cannot retrieve repository metadata for repository: epel (rhel 6.6)

Im trying to install linux nrpe agent on one of the test rhel boxes for nagiosxi to monitor and when i run the fullinstall script im getting this following error
[root#nrpetest2 linux-nrpe-agent]# ./fullinstall
============================
Nagios Linux Agent Installer
============================
This script will install the Nagios Linux Agent by executing all necessary
sub-scripts.
IMPORTANT: This script should only be used on a clean installed system:
RedHat Enterprise, CentOS, Fedora, or Oracle
OpenSUSE or SUSE Enterprise
Ubuntu or Debian
Do NOT use this on a system running any other distro or that
does not allow additional package installation.
Do you want to continue? [Y/n] y
Proceeding with installation...
Running './0-repos'...
Configuring Repos...
Enabling EPEL repo...
Installing EPEL PKG: ./packages/epel-release-6-5.noarch.rpm
warning: ./packages/epel-release-6-5.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ##################################################
epel-release ##################################################
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again
epel-release RPM installed OK
Repos configured OK
RESULT=0
Running './1-prereqs'...
Installing prerequisites...
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again
RESULT=1
===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).
If you require assistance in resolving the issue, please include install.log
in your communications with Nagios XI technical support.
The script that failed was: './1-prereqs'
I have it registered with RedHat network as well and i searched everywhere to find a solution to this error but had no luck.
It looks like you are missing the required epel-release for nagios to install.
Have your tried doing a sudo yum install epel-release?
That would be my biggest guess, according to your line:
Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again RESULT=1The script that failed was: './1-prereqs'
Also, check to make sure that your proxy settings allow for a connection to that repository. Sometimes this causes a problem with downloading certain repo data.
So, in short, update your epel-release and make sure that any other pre-requisities have been updated. It probably wouldn't hurt to do: sudo yum install yum-utils to make sure that yum-utils is fully up-to-date.
UPDATE: From: Access Redhat
Verify that Satellite or Proxy Server has a fully-qualified domain name, and CommonName in SSL cert. used by Apache is set to the fully-qualified domain name.
Verify that the ssl.conf file is pointing to the correct files.grep ^SSLCert /etc/httpd/conf.d/ssl.conf
If system points to a proxy, check to make sure that /etc/sysconfig/rhn/up2date is configured with correct http_proxy information. httpProxy=http_proxy_fqdn or ip_address:port
Update yum to latest version: yum update yum
Clean the cache on client system: rm -rf /var/cache/yum/*

pecl install mongo command for mongo-1.5.5.tgz produce invalid tgz error

Overview
I was creating my Docker image to setup Rockmongo.
In the Dockerfile, I have a command
pecl install mongo
This command was working before but when ran t today I am getting this error,
downloading mongo-1.5.5.tgz ...
Starting to download mongo-1.5.5.tgz (Unknown size)
....done: 3,582 bytes
Could not get contents of package "/build/buildd/php5-5.3.10/pear-build-download/mongo-1.5.5.tgz". Invalid tgz file.
Download of "pecl/mongo" succeeded, but it is not a valid package archive
Error: cannot download "pecl/mongo"
Reference
To view the whole docker file
https://github.com/gilacode/docker-rockmongo/blob/master/Dockerfile
Question
Is there any way to specificy a different version of the Mongo package during the "pecl install command"?
I see this is an old question but anyway ...
I had the same issue and it was not due to the pecl website.
It seems to be a bug with the "lfs" option when you compile php5.
To verify if this is your case type: php-config --phpapi
I got it working by adding the --nocompress option
[sudo pecl install --nocompress mongo]
You can see other details here https://bugs.php.net/bug.php?id=67075