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
On this page, we will attempt to highlight some of the most common YUM errors, and how to fix them.
Summary
When trying to install or update packages using yum on client systems, yum is failing with one of the following errors:
[Errno 14] HTTP Error 404: Not Found
[Errno 14] HTTPS Error 404 - Not Found
[Errno 14] HTTP Error 404: Status 404
[Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 403"
[Errno 14] Error 60 - It was impossible to connect to the FreePBX distro mirror servers
Leading Causes
- You are not connected to the internet.
- This issue can also occur if the system is able to communicate with given server but could not find or access the requested package or path on the server.
- You have a misconfigured proxy server.
Fixes
- Validate the system can see things on the internet.
-
This issue can also occur due to corruption of the local machine cache, try to clear cache on system:
yum clean all
rm -rf /var/cache/yum/*
-
If you have a proxy server, validate it is configured properly in /etc/yum.conf. Here is an example (your names, passwords, and port numbers will obviously be different).
proxy=http://mystuff.mydomain.com:1234 # Account details for yum connections proxy_username=proxy-user proxy_password=proxy-password
If that does not work or if you still need help, try one of our community help platforms: https://community.freepbx.org or https://issues.freepbx.org/
Another app is currently holding the yum lock; waiting for it to exit…The other application is: yum | |
There are unfinished transactions remaining. | |
TLSv1.3 enabled by config, but not supported by system OpenSSL | |
Error: Connection activation failed: No suitable device found for this connection (device enp0s3 not available because device has no carrier) | |
There are unfinished transactions remaining | |
Похожие статьи |
Another app is currently holding the yum lock; waiting for it to exit…The other application is: yum
Вы пытаетесь воспользоваться yum и получаете ошибку
Another app is currently holding the yum lock; waiting for it to exit…
The other application is: yum
Memory : 96 M RSS (419 MB VSZ)
Started: Fri Mar 19 03:11:06 2021 — 7:44:44 ago
State : Sleeping, pid: 6217
Обратите внимание на pid (Process ID)
В данном примере pid равен 6217 — выясним что это за процесс с помощью команды ps
ps
Флаг -e означает вывести все активные процессы в стандартном виде
Флаг -f делает вывод более детальным (full — полный)
ps -ef | grep 6217
root 6217 6215 0 03:11 ? 00:01:18 /usr/bin/python /bin/yum -y install system_latest.rpm
root 6259 6217 0 03:12 ? 00:00:00 /bin/sh /var/tmp/rpm-tmp.3TcCYA 2
andrei 30392 29844 0 10:58 pts/0 00:00:00 grep —color=auto 6217
Разберём вывод:
Последняя строка это наш запрос, поэтому она нам неинтересна. Оставим две первые строки + я подпишу столбцы
UID PID PPID C STIME TTY TIME CMD
root 6217 6215 0 03:11 ? 00:01:18 /usr/bin/python /bin/yum -y install system_latest.rpm
root 6259 6217 0 03:12 ? 00:00:00 /bin/sh /var/tmp/rpm-tmp.3TcCYA 2
PPID — это ID родительского процесса. То есть того который запустил данный процесс
6217 был запущен из 6215
При этом 6217 сам успел запустить процесс 6259
Чтобы освободиться от процесса 6217 воспользуемся командой kill
sudo kill -9 6217
Если вам интересно проследить всю цепочку вызовов — это несложно сделать.
Пройдём по цепочке процессов в начало
ps -ef | grep 6215
root 6215 6114 0 03:11 ? 00:00:00 sudo -S yum -y install system_latest.rpm
ps -ef | grep 6114
andrei 6114 1 0 03:10 ? 00:00:00 bash -c sudo ntpdate -u 0.fi.pool.ntp.org; sudo yum -y update; sudo yum -y upgrade; sudo -S yum -y install system_latest.rpm
Вот мы и добрались до самого первого вызова yum из моего скрипта. Точно также можно пойти вперёд.
There are unfinished transactions remaining. You might consider running yum-complete-transaction, or «yum-complete-transaction —cleanup-only» and «yum history redo last», first to finish them. If those don’t work you’ll have to try removing/installing packages by hand (maybe package-cleanup can help).
yum-complete-transaction
yum-complete-transaction —cleanup-only
[Errno 28] No space left on device: ‘//var/lib/yum/rpmdb-indexes/conflicts.tmp’
[WARN] TLSv1.3 enabled by config, but not supported by system OpenSSL
Если у вас CentOS 7 эту ошибку устранить проблематично. Можно сбилдить OpenSSL 1.1.1 из исходников
wget https://www.openssl.org/source/openssl-1.1.1m.tar.gz
tar -xvfj openssl-1.1.1m.tar.gz
cd openssl-1.1.1m
configure
make
make install
Но это будет не замена 1.0.2 а параллельная установка, с которой нужно уметь работать
Error: Connection activation failed: No suitable device found for this connection (device enp0s3 not available because device has no carrier)
Пока не нашёл полноценного решения кроме как прописывания
статического IP
для этого интерфейса.
unfinished transactions
При использовании yum может появится следующая ошибка, говорящая о том, что в какой-то
yum процесс не был правильно завершён.
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction, or «yum-complete-transaction —cleanup-only» and «yum history redo last», first to finish them. If those don’t work you’ll have to try removing/installing packages by hand (maybe package-cleanup can help).
The program yum-complete-transaction is found in the yum-utils package.
Решить эту проблему можно последовав совету выше.
sudo yum install -y yum-utils
sudo yum-complete-transaction
CentOS | |
Установка CentOS | |
Настройка после установки | |
Настройка и мониторинг сети: firewall, ifop, tc, nethogs… | |
Настройка даты и времени | |
X Window System CentOS | |
XRDP: Удалённый рабочий стол | |
VNC: Удалённый рабочий стол | |
Изменить machine-id | |
Изменить ulimit | |
xclip: работа с буфером обмена | |
docker-ce: установка в CentOS 8 | |
Пользователи | |
Безопасный режим | |
Железо: CPU, RAM | |
FAQ | |
Разбор ошибок | |
Установка виртуальной CentOS на Ubuntu | |
Docker контейнер CentOS с SSH доступом | |
Файлы | |
Объединить .pdf файлы | |
diff: сравнение файлов | |
find: поиск файлов | |
kill: завершить процесс | |
make | |
signal: системные сигналы | |
env: переменные окружения | |
localectl: язык | |
systemctl: Список активных сервисов | |
SCP: обмен файлами; | |
SSH: удалённый доступ | |
cron: задания по расписанию | |
sudo |
Добрый день.
Хотелось бы предупредить недовольство участников форума и принести извИнения, если не верно выбрал раздел для вопроса.
Ну и за то, что не смог найти решение своей проблемы в поисковике.
Преамбула:
Линуксом пользуюсь, от силы, второй день — т.ч…
По проблеме:
Fedora 21, выполнен yum update, после первой загрузки, добавлены какие-то репозитории (К сожалению не могу сказать какие — команды для просмотра не знаю, по какой статье делал не помню… Вот такой вот ламер 8( )
При выполнении sudo yum update следующая ошибка:
Загружены модули: langpacks
adobe-linux-i386 |
951 B 00:00
adobe-linux-x86_64 | 951 B 00:00
fedora/21/x86_64/metalink | 31 kB 00:00
rpmfusion-free | 1.2 kB 00:00
rpmfusion-free-updates | 2.7 kB 00:00
rpmfusion-nonfree | 1.2 kB 00:00
rpmfusion-nonfree-updates | 2.7 kB 00:00
Could not retrieve mirrorlist http://mirrors.rfremix.ru/mirrorlist?repo=free-fedora-updates-released-21&arch=x86_64 error was
12: Timeout on http://mirrors.rfremix.ru/mirrorlist?repo=free-fedora-updates-released-21&arch=x86_64: (28, 'Connection timed out after 30001 milliseconds')
^CCould not retrieve mirrorlist http://mirrors.rfremix.ru/mirrorlist?repo=nonfree-fedora-21&arch=x86_64 error was
14: curl#56 - "Callback aborted"
One of the configured repositories failed (Russian Fedora for Fedora 21 - Nonfree),
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. Disable the repository, 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 russianfedora-nonfree
4. 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=russianfedora-nonfree.skip_if_unavailable=true
Cannot find a valid baseurl for repo: russianfedora-nonfree/21/x86_64
______________________________
Пробовал сделать:
sudo yum-config-manager —disable russianfedora-nonfree
Результат:
========================= repo: russianfedora-nonfree ==========================
[russianfedora-nonfree]
async = True
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/21
baseurl =
cache = 0
cachedir = /var/cache/yum/x86_64/21/russianfedora-nonfree
check_config_file_age = True
cost = 1000
deltarpm_metadata_percentage = 100
deltarpm_percentage =
enabled = 0
enablegroups = True
exclude =
failovermethod = priority
gpgcadir = /var/lib/yum/repos/x86_64/21/russianfedora-nonfree/gpgcadir
gpgcakey =
gpgcheck = True
gpgdir = /var/lib/yum/repos/x86_64/21/russianfedora-nonfree/gpgdir
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-russianfedora-nonfree-fedora
hdrdir = /var/cache/yum/x86_64/21/russianfedora-nonfree/headers
http_caching = all
includepkgs =
ip_resolve =
keepalive = True
keepcache = False
mddownloadpolicy = sqlite
mdpolicy = group:small
mediaid =
metadata_expire = 21600
metadata_expire_filter = read-only:present
metalink =
minrate = 0
mirrorlist = http://mirrors.rfremix.ru/mirrorlist?repo=nonfree-fedora-21&arch=x86_64
mirrorlist_expire = 86400
name = Russian Fedora for Fedora 21 - Nonfree
old_base_cache_dir =
password =
persistdir = /var/lib/yum/repos/x86_64/21/russianfedora-nonfree
pkgdir = /var/cache/yum/x86_64/21/russianfedora-nonfree/packages
proxy = False
proxy_dict =
proxy_password =
proxy_username =
repo_gpgcheck = False
retries = 10
skip_if_unavailable = False
ssl_check_cert_permissions = True
sslcacert =
sslclientcert =
sslclientkey =
sslverify = True
throttle = 0
timeout = 30.0
ui_id = russianfedora-nonfree/21/x86_64
ui_repoid_vars = releasever,
basearch
username =
После чего еще раз запустить:
sudo yum update — результат аналогичен первому запуску.
При этом смущает, что http://mirrors.rfremix.ru в браузере не открывается, ping на mirrors.rfremix.ru не проходит.
Но форуме, вот в этой теме:
Fedora 18 ошибка при обновлении
Нашел вариант с:
repoquery —whatrequires —recursive PACKAGENAME
Но, повторюсь, т.к. с линуксом полный ноль — даже не представляю, что делает данная команда (ушел читать).
_______________________________________________
Решение
_______________________________________________
Если кто-то из таких же нубов, как и я, зайдет — что бы не читать комментарии по оформлению и ошибкам:
Данная команда очищает кэш, на сколько понял из описания.
Кстати, есть еще и команда на создание кэша, но я её не применял:
После этого я получил ошибку по flash’y и «Разрешение зависимостей» — было решено через «yum remove» для флэша и его переустановкой.
Not able to download packages with yum due to the error ‘[Errno 256] No more mirrors to try’? We can help you with it.
Usually, corrupted yum cache or repo directory ends up in this error. A few file cleanups can easily fix this.
This can also occur due to an outdated whitelist of the Public CIDR list.
At Bobcares, we often fix yum errors, as a part of our Server Management Services.
Today, let’s have a look into this yum error. And see how our Support Engineers fix this.
Why does yum downloading packages end up in error?
We often use yum to install packages and dependencies in a single command. However, sometimes we have seen this yum updates ending up with an error.
Mostly, this happens due to errors with yum cache, local files in the repository folder, outdated firewall rules, etc.
Let’s check out how our Support Engineers fix this error in each case.
How we fix the yum error in downloading packages?
The error message while installing the FTP package appears as,
Now let’s have a look at each reason and its fix.
1. Clear yum cache to download packages
Old cache in the system can cause errors while downloading packages. Hence our Support Engineers delete the cache using the command,
rm -rf /var/cache/yum/*
In addition, we also delete the metadata for the enables repositories. For this, we use the command,
yum clean metadata
Later, we clean up the yum folder using the command,
yum clean all
Finally, we check the yum update again. Thereby, we ensure to fix the error.
2. Check repository to fix yum error
In some servers, the yum repository contains corrupted files. And accessing these repositories while updating can cause errors. So our Support Engineers check the folder yum.repos.d
Initially, we list the files using the command,
ll /etc/yum.repos.d
Later we check the system registry. Our Experts check the files under both RHN classic and RHSM. And removes the error causing local repositories. Later, we check if the update is running successfully.
3. Network access to download packages
Similarly, network access is important for yum updates. So, we check the access to the repository URL by ping.
In addition, we also ensure to whitelist the Public CIDR list for Red Hat. Because outdated whitelist restricts access to the CDN can result in errors.
Usually, yum download the packages using the base URL in the config file. This URL is cdn.redhat.com. Basically, there are multiple servers resolving to this address.
So we whitelist these IPs listed in the Public CIDR list.
[Need assistance in fixing yum errors? – We are available 24/7]
Conclusion
In short, yum error downloading packages occur due to corrupted cache or repository. Another possible reason is network access denial due to the firewall in the system. Today, we saw how our Support Engineers fix this error.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
GET STARTED
var google_conversion_label = «owonCMyG5nEQ0aD71QM»;