I use steam deck as a workstation. Initially, I needed to install the clang-format for c/c++, but there was a problem with pacman. Below I will provide the errors that I encounter. My system has been translated into Russian, so I will duplicate the translation below the original errors.
The main thing I want to solve is to install the clang-format. Solving the problem with paсman is a secondary task.
Original errors:
sudo pacman -S foobar:
ошибка: не удалось начать транзакцию (не удалось заблокировать базу данных) ошибка: не удалось заблокировать базу: Файловая система доступна только для чтения
sudo pacman -Sy:
:: Обновление баз данных пакетов... ошибка: failed to synchronize all databases (не удалось заблокировать базу данных)
clang-format:
bash: clang-format: команда не найдена
Translated into English:
sudo pacman -S foobar:
error: Failed to start transaction (failed to lock database) error: failed to lock database: File system is read-only
sudo pacman -Sy:
::Updating package databases... error: failed to synchronize all databases (failed to lock the database)
clang-format:
bash: clang-format: command not found
I used similar questions and found several solutions, but none worked for me.
- It was suggested to delete this file:
sudo rm /var/lib/pacman/db.lck
. However, I don’t have any paсman file or directory. - It was suggested to delete the installation files using the
pacman -Scc
command.
It gave the following error:
error: failed to start transaction (failed to lock the database) error: failed to lock the database: The file system is read-only
MemoryNTd is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.