Difference between revisions of "Pacman troubleshooting/ru"

Created page with "sudo pacman-key --populate archlinux manjaro"
(Created page with "Если ошибка не исчезла, то рекомендуется '''Change to a Different Download Server|переход на другой сервер загру...")
(Created page with "sudo pacman-key --populate archlinux manjaro")
Line 1: Line 1:
<languages/>
<languages/>
__TOC__
__TOC__
= Software Installation =
= Установка программ =


Various issues relating to the download and installation of software packages from the Manjaro repositories are dealt with here.
Здесь рассматриваются различные вопросы, связанные с загрузкой и установкой программных пакетов из репозиториев Manjaro.


== "Unrecognized archive format" Error ==
== Ошибка "Нераспознанный формат архива" ==


It has ocurred more than once, an update is issuing these messages in a seemingly never ending stream.
Это происходило неоднократно, обновление выдает эти сообщения в, казалось бы, бесконечном потоке.
[https://forum.manjaro.org/t/pacman-could-not-open-file-sync-files/20046 Pacman could not open file: sync files]
[https://forum.manjaro.org/t/pacman-could-not-open-file-sync-files/20046 Pacman не смог открыть файл: синхронизировать файлы].


  error: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive format
  error: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive format
Line 15: Line 15:
  error: could not open file /var/lib/pacman/sync/multilib.db: Unrecognized archive format
  error: could not open file /var/lib/pacman/sync/multilib.db: Unrecognized archive format


The error relates to a mismatch in the information contained in the db files at the mentioned location and the db files at the first mirror in your mirrorlist. Pacman checks a package in the database and sees if the signature file matches the one in the database. If it does not, then pacman will say the package is corrupted.
Ошибка связана с несоответствием информации, содержащейся в файлах db в указанном месте и файлах db на первом зеркале в вашем списке зеркал. Pacman проверяет пакет в базе данных и смотрит, совпадает ли файл сигнатуры с файлом в базе данных. Если нет, то pacman сообщит, что пакет поврежден.


While it sometimes is possible to fix the issue simply by deleting the files and the running a pacman update it far from every time.
Хотя иногда проблему можно решить, просто удалив файлы и запустив обновление pacman, это возможно далеко не каждый раз.


=== One recipe for fixing this ===
=== Один рецепт для исправления этого ===


It is mandatory to ensure that the keyrings is current. By ensuring the keyrings are in shape and then redownloading the databases we reestablish the chain of trust between the keyrings and the packages.
Обязательно нужно убедиться, что связки ключей актуальны. Убедившись, что ключи в актуальном состоянии, а затем заново загрузив базы данных, мы восстановим связь между ключами и пакетами.




'''You will have to find the correct names by looking at'''
'''Вам придется найти правильные имена, посмотрев'''.
  Browse [https://mirror.netzspielplatz.de/manjaro/packages/pool/overlay https://mirror.netzspielplatz.de/manjaro/packages/pool/overlay] for the current manjaro-keyring
  Просмотрите [https://mirror.netzspielplatz.de/manjaro/packages/pool/overlay https://mirror.netzspielplatz.de/manjaro/packages/pool/overlay] для текущего manjaro-keyring
and
и
  Browse [https://mirror.netzspielplatz.de/manjaro/packages/pool/sync https://mirror.netzspielplatz.de/manjaro/packages/pool/sync] for the current archlinux-keyring
  Просмотрите [https://mirror.netzspielplatz.de/manjaro/packages/pool/sync https://mirror.netzspielplatz.de/manjaro/packages/pool/sync] для текущего archlinux-keyring


'''Replace yyyymmdd and x with the info found at the above links'''
'''Замените yyyymmdd и x на информацию, найденную по вышеуказанным ссылкам'''.


  sudo pacman -U https://mirror.netzspielplatz.de/manjaro/packages/pool/overlay/manjaro-keyring-yyyymmdd-x-any.pkg.tar.xz
  sudo pacman -U https://mirror.netzspielplatz.de/manjaro/packages/pool/overlay/manjaro-keyring-yyyymmdd-x-any.pkg.tar.xz
  sudo pacman -U https://mirror.netzspielplatz.de/manjaro/packages/pool/sync/archlinux-keyring-yyyymmdd-x-any.pkg.tar.xz
  sudo pacman -U https://mirror.netzspielplatz.de/manjaro/packages/pool/sync/archlinux-keyring-yyyymmdd-x-any.pkg.tar.xz


'''Remove your faulty databases'''
'''Удалите неисправные базы данных'''
  sudo rm -f /var/lib/pacman/sync/*
  sudo rm -f /var/lib/pacman/sync/*
'''Download the databases and update the system'''
'''Загрузите базы данных и обновите систему'''
  sudo pacman -Syyu
  sudo pacman -Syyu


== "Unable to lock database" Error ==
== Ошибка "Невозможно заблокировать базу данных" ==


When downloading and installing software from the repositories, a special database lock file will be created in order to ensure that the current installation process is the only one running at that time. Otherwise, attempting to install multiple files from multiple sources simultaneously may corrupt the downloaded files, cause file conflicts - or worse still - damage your system. Once the installation has been completed, the lock file will then be automatically deleted. This error may therefore occur due to two possible reasons:
При загрузке и установке программного обеспечения из репозиториев создается специальный файл блокировки базы данных, чтобы убедиться, что текущий процесс установки является единственным, запущенным в данный момент. В противном случае попытка одновременной установки нескольких файлов из нескольких источников может привести к повреждению загруженных файлов, конфликтам файлов или, что еще хуже, к повреждению системы. После завершения установки файл блокировки будет автоматически удален. Таким образом, эта ошибка может возникнуть по двум возможным причинам:


* Another installation is still taking place and has not yet finished, or
* Другая установка все еще выполняется и еще не завершена, или
* A previous installation attempt had not finished properly (e.g. due to being aborted early)
* Предыдущая попытка установки не завершилась должным образом (например, была прервана раньше времени).


It is therefore wise to first check to ensure that another installation is not (or had not been) in process at the time of the error. When satisfied that this is not the case, then the database lock file can be manually deleted. To do so, open up the terminal and enter the following command:
Поэтому целесообразно сначала убедиться, что в момент возникновения ошибки не выполняется (или не выполнялась) другая установка. Убедившись что это не так, можно вручную удалить файл блокировки базы данных. Для этого откройте терминал и введите следующую команду:


  sudo rm /var/lib/pacman/db.lck
  sudo rm /var/lib/pacman/db.lck


Once done, you should now be able to successfully re-attempt your intended installation.
После этого вы сможете успешно повторить попытку установки.




== Errors about Keys ==
== Ошибки ключей ==


We all have our own unique signatures which are used to authenticate who we are and to prevent fraudulent or even malicious activities by others. This is also the case with software packages available from the software repositories. They all contain encrypted codes (signature keys) unique to their developers to ensure that they are authentic and not malicious in nature.  
У каждого из нас есть свои уникальные подписи, используемые для подтверждения подлинности нашей личности и предотвращения мошеннических или даже вредоносных действий со стороны других людей. То же самое происходит и с программными пакетами, доступными в репозиториях программного обеспечения. Все они содержат зашифрованные коды (ключи подписи), уникальные для их разработчиков, что гарантирует их подлинность и отсутствие вредоносного характера.  


During the installation process, once any software packages have been downloaded, your system will first check their signature keys to ensure that they are authentic prior to actually installing them. If a signature key cannot be verified for any reason, then the installation process will be aborted. This problem will usually occur due to:
В процессе установки, после загрузки любых пакетов программного обеспечения, система сначала проверит их ключи подписи, чтобы убедиться в их подлинности, прежде чем приступить к установке. Если по какой-либо причине ключ подписи не может быть проверен, процесс установки будет прерван. Эта проблема обычно возникает по следующим причинам:


* one or more signature keys contained in your system's database being revoked, changed, corrupted, or out of date
* один или несколько ключей подписи, содержащихся в базе данных вашей системы, отозваны, изменены, повреждены или устарели
* one or more software packages not having been signed off properly when placed in a repository
* один или несколько пакетов программного обеспечения не были должным образом подписаны при размещении в репозитории


Where a package has not been signed off properly before being placed in a repository, it will be the responsibility of the developer(s) to correct this. However, as this problem will be more than likely due to a problem with your system's verification of a signiture key, this can be solved in three easy steps. Working net connection is required. Once you have opened your terminal:
Если пакет не был подписан должным образом перед помещением в репозиторий, ответственность за исправление лежит на разработчике(-ах). Однако, поскольку эта проблема, скорее всего, связана с проблемой проверки ключа подписи в вашей системе, ее можно решить в три простых шага. Требуется рабочее подключение к сети. После того как вы открыли свой терминал:


{{Warning|The following commands only work, when your system time is set correctly! }}
{{Warning|Следующие команды работают только тогда, когда ваше системное время установлено правильно!}}


<s>'''1. Remove old (and possibly broken) keys''' by entering this command:
<s>'''1. Удалите старые (и, возможно, сломанные) ключи''', введя эту команду:
   
   
  sudo rm -r /etc/pacman.d/gnupg  
  sudo rm -r /etc/pacman.d/gnupg  


'''2. Reinstall keyrings including the latest keys''':
'''2. Переустановите связки ключей, включая последние ключи''':


  sudo pacman -Sy gnupg archlinux-keyring manjaro-keyring
  sudo pacman -Sy gnupg archlinux-keyring manjaro-keyring


'''2. Initialize the pacman keyring''':
'''3. Инициализируйте связку ключей pacman''':


  sudo pacman-key --init  
  sudo pacman-key --init  


'''4. Load the signature keys''':
'''4. Загрузите ключи подписи''':


  sudo pacman-key --populate archlinux manjaro  
  sudo pacman-key --populate archlinux manjaro  


'''5. Refresh and update the signature keys''':  
'''5. Обновите и актуализируйте ключи подписей''':  


  sudo pacman-key --refresh-keys  
  sudo pacman-key --refresh-keys  


'''6. Clear out the software packages downloaded during the aborted installation''' (optional):  
'''6. Очистите пакеты программ, загруженные во время прерванной установки''' (необязательно):  


  sudo pacman -Sc</s>
  sudo pacman -Sc</s>


{{BoxInfo|Info|Improved version added, since it doesn't work that way above. The packages are signed and since '''/etc/pacman.d/gnupg''' has been removed, it cannot be installed due the check. Instead editing the '''/etc/pacman.conf''' and lowering the SigLevel, it would be better installing the keyrings without a check manually to overcome this problem.}}
{{BoxInfo|Info|Добавлена улучшенная версия, так как выше она не работает. Пакеты подписаны, и поскольку '''/etc/pacman.d/gnupg''' был удален, он не может быть установлен из-за проверки. Вместо редактирования '''/etc/pacman.conf''' и понижения SigLevel, было бы лучше установить ключи без проверки вручную, чтобы решить эту проблему.}}


'''1. Remove old (and possibly broken) keys''' by entering this command:
'''1. Удалите старые (и, возможно, сломанные) ключи''', введя эту команду:
   
   
  sudo rm -r /etc/pacman.d/gnupg  
  sudo rm -r /etc/pacman.d/gnupg  


'''2. Initialize the pacman keyring''':
'''2. Инициализируйте связку ключей pacman''':
   
   
  sudo pacman-key --init  
  sudo pacman-key --init  


'''3. Download the packages:'''
'''3. Скачайте пакеты:'''
{{BoxInfo|Info| GPG check errors can be ignored, since it only downloads the keyring packages.}}
{{BoxInfo|Info| Ошибки проверки GPG можно игнорировать, так как загружаются только пакеты связок ключей.}}
   
   
  mkdir -pv $HOME/.cache/pkg/ && sudo pacman -Syw archlinux-keyring manjaro-keyring --cachedir $HOME/.cache/pkg/
  mkdir -pv $HOME/.cache/pkg/ && sudo pacman -Syw archlinux-keyring manjaro-keyring --cachedir $HOME/.cache/pkg/


'''4. Remove the signatures:'''
'''4. Удалите подписи:'''
{{BoxInfo|Info| Signatures must be removed to avoid the automatic check of the packages.}}
{{BoxInfo|Info| Подписи должны быть удалены во избежание автоматической проверки пакетов.}}
   
   
  rm -f $HOME/.cache/pkg/*.sig
  rm -f $HOME/.cache/pkg/*.sig


'''5. Install the downloaded packages manually:
'''5. Установите загруженные пакеты вручную:
{{BoxInfo|Info|This will also trigger the populate process.}}
{{Это также запустит процесс добавления.}}
  sudo pacman -U $HOME/.cache/pkg/*.tar.zst
  sudo pacman -U $HOME/.cache/pkg/*.tar.zst


'''6. Clear out the software packages downloaded during the aborted installation''' (optional):  
'''6. Очистите пакеты программ, загруженные во время прерванной установки''' (необязательно):  
{{warning|The above command clears the pacman cache completely, and one will not be able to downgrade to a previous version of a package if required. Instead packages that are causing signing errors can be removed individually when upgrading.}}
{{warning|Вышеуказанная команда полностью очищает кэш pacman и вы не сможете перейти к предыдущей версии пакета при необходимости. Вместо этого пакеты, вызывающие ошибки подписи, могут быть удалены по отдельности при обновлении}}.
   
   
  sudo pacman -Sc
  sudo pacman -Sc
   
   
'''7. Remove the custom package folder:''' (optional):  
'''7. Удалите папку пользовательских пакетов:''' (необязательно):  
   
   
  sudo rm -Rf $HOME/.cache/pkg/
  sudo rm -Rf $HOME/.cache/pkg/




After that try running '''sudo pacman -Syu''' to see if the errors were resolved.
После этого попробуйте запустить '''sudo pacman -Syu''' и посмотреть, были ли устранены ошибки.


== Conflicting files - ''FILENAME'' exists in filesystem ==
== Конфликтующие файлы - ''FILENAME'' exists in filesystem ==


'''If you cant can't install or update a package because of an error like this:'''
''' Если вы не можете установить или обновить пакет из-за ошибки, подобной этой:'''


  error: could not prepare transaction
  error: could not prepare transaction
Line 135: Line 135:
  Errors occurred, no packages were upgraded.
  Errors occurred, no packages were upgraded.


Then the package manager, pacman, has detected an unexpected file that already exists on the disk.
Затем менеджер пакетов pacman обнаружил неожиданный файл, который уже существует на диске.


'''Why is this happening?'''
''Почему это происходит?'''


By design pacman will '''not''' overwrite files that already exist. This is a design feature, not a flaw - package managers are designed to keep track of installed files.
По своей конструкции pacman '''не'' перезаписывает существующие файлы. Это особенность разработки, а не недостаток - менеджеры пакетов предназначены для отслеживания установленных файлов.


This issue normally happens because you've manually added, copied, or created a file. It can also happen when you install software using a downloaded executable, run a make install, or use a third-party package system such as conda. It also occurs when you install an AUR package which installs files that conflict with a repo package.
Обычно эта проблема возникает, когда вы вручную добавляете, копируете или создаете файл. Это также может произойти, если вы устанавливаете программное обеспечение с помощью загруженного исполняемого файла, выполняете make install или используете пакетную систему сторонних производителей, например conda. Это также происходит при установке пакета AUR, устанавливающий файлы, конфликтующие с пакетом из репозитория.


When using a third-party installer you should always specify an alternative installation location, such as under your home directory, or under /opt or /usr/local/. Never install directly under / or /usr.
При использовании сторонней программы установки всегда указывайте альтернативное место установки, например, в вашем домашнем каталоге или в каталоге /opt или /usr/local/. Никогда не устанавливайте непосредственно в / или /usr.


'''How can I fix this?'''
'''Как мне это исправить?'''


The first step is to identify which, if any, package owns the file. This can be easily done with:
Первый шаг - определить, какой пакет, если таковой имеется, владеет файлом. Это можно легко сделать с помощью:


  pacman -Qo /path/to/file
  pacman -Qo /путь/к/файлу


If this identifies a conflicting package you can decide to remove it with pacman -R. If no package is identified you can delete the file (or move it to a backup location).
Если при этом обнаружится конфликтующий пакет, то вы можете решить удалить его с помощью команды pacman -R. Если пакет не обнаружен, вы можете удалить файл (или переместить его в резервное место).


'''Where can I read more?'''
'''Где можно прочитать больше?'''


This post was inspired by (and adapted from):
Этот пост был вдохновлен (и адаптирован из):


https://wiki.archlinux.org/title/Pacman#%22Failed_to_commit_transaction_(conflicting_files)%22_error
https://wiki.archlinux.org/title/Pacman#%22Failed_to_commit_transaction_(conflicting_files)%22_error


The above post also has links to further reading.
В приведенном выше сообщении также есть ссылки на дальнейшее чтение.


== "Configuration file...not recognized" Error ==
== Ошибка "Файл конфигурации...не распознан" ==


Manjaro's package manager - '''[[pacman]]''' - uses a file called ''mirrorlist'' to tell it the internet addresses of the Manjaro servers in order to download updates and software applications from them. This error will therefore occur if one or more server addresses contained in the mirrorlist file have not been listed properly, resulting in pacman being unable to connect to them. Another tell-tale sign is that this problem will also be encountered immediately after:
Менеджер пакетов Manjaro - '''[[pacman]]'''' - использует файл под названием ''mirrorlist'', сообщающий ему интернет-адреса серверов Manjaro для загрузки с них обновлений и программ. Эта ошибка возникает, если один или несколько адресов серверов, содержащихся в файле mirrorlist, не были указаны правильно, в результате чего pacman не может подключиться к ним. Еще одним признаком является то, что эта проблема также возникнет сразу после:


* Installing Manjaro and editing the mirrorlist file during installation, or
* Установки Manjaro и редактирования файла mirrorlist во время установки, или
* Editing the mirrorlist file at a later time.
* Редактирования файла mirrorlist позднее.


See the [[Change to a Different Download Server]] guide for more detailed information on how to correctly select and enable another Manjaro server for downloading.
Смотрите руководство [[Change to a Different Download Server|Переход на другой сервер загрузки]] для более подробной информации о том, как правильно выбрать и включить другой сервер Manjaro для загрузки.




== "GPGME error: No data" Error ==
== Ошибка "GPGME error: No data" ==


The most likely cause of this issue is that an error or corruption has been detected by ''pacman'' in one or more software packages being downloaded. Package signatures and checksums are used to verify the validity of downloaded software, and should they fail, the installation attempt will be aborted to protect your system until the matter is resolved.
Наиболее вероятная причина этой проблемы заключается в том, что ''pacman'' обнаружил ошибку или повреждение в одном или нескольких загружаемых пакетах программного обеспечения. Подписи и контрольные суммы пакетов используются для проверки достоверности загружаемого программного обеспечения, и если они не работают, попытка установки будет прервана для защиты вашей системы, пока проблема не будет решена.




=== Option 1: Basic Resolution ===
=== Вариант 1: Базовое разрешение ===


To resolve this issue, first follow the basic procedure provided below. If this does not work, then there is a more comprehensive procedure available.
Чтобы решить эту проблему, сначала выполните основную процедуру, приведенную ниже. Если это не сработает, можно воспользоваться более комплексной процедурой.




1. Download the package databases and update your system:
1. Загрузите базы данных пакетов и обновите систему:


  sudo pacman -Syyu
  sudo pacman -Syyu


2. Clear out the software packages downloaded during the aborted installation by entering the command:  
2. Очистите пакеты программного обеспечения, загруженные во время прерванной установки, введя команду:  


  sudo pacman -Sc
  sudo pacman -Sc


3. Re-attempt the aborted download.
3. Повторите попытку прерванной загрузки.


=== Option 2: Comprehensive Resolution ===
=== Вариант 2: Комплексное решение ===


If the basic proceedure still does not resolve the matter, further steps are available:
Если основная процедура не приведет к решению вопроса, можно предпринять дальнейшие шаги:




1. Resynchronise with the Manjaro servers to ensure that everything is up to date by entering the command:
1. Выполните повторную синхронизацию с серверами Manjaro, чтобы убедиться, что все данные обновлены, введя команду:


  sudo pacman -Syy
  sudo pacman -Syy


2. Refresh and update the signature keys by entering the command:
2. Обновите ключи подписей, введя команду:


  sudo pacman-key --refresh-keys
  sudo pacman-key --refresh-keys


3. Reload the signature keys by entering the command:
3. Перезагрузите ключи подписей, введя команду:


  sudo pacman-key --populate archlinux manjaro
  sudo pacman-key --populate archlinux manjaro


4. Clear out the software packages downloaded during the aborted installation by entering the command:  
4. Очистите пакеты программного обеспечения, загруженные во время прерванной установки, введя команду:  


  sudo pacman -Sc
  sudo pacman -Sc


5. Re-attempt the aborted download.
5. Повторите попытку прерванной загрузки.




Line 225: Line 225:




= See Also =
= Смотрите также =


* '''[[Change to a Different Download Server|Переход на другой сервер загрузки]]'''
* '''[[Change to a Different Download Server|Переход на другой сервер загрузки]]'''
translator
10,714

edits