Y
Y
Yarik Mamaev2018-06-30 22:40:29
linux
Yarik Mamaev, 2018-06-30 22:40:29

Why doesn't root have enough permissions???

An error occurred with packages when trying to reinstall MySQL. Not all packages were removed when uninstalled. I had to resort to dancing with a tambourine, to call on the spirit of the life-giving Bill and look for something, I don’t know what. Something was found, but what was found does not want to be deleted. Doesn't want to. Even root doesn't help.

# find / -iname ‘mysql*’ -exec rm -rf {} \;
find: ‘/run/user/1000/gvfs’: Отказано в доступе

I found this instruction on this resource zettahelp.ru/blogs/Ubuntu/kak-polnostyu-udalit-mys...
I look forward to your answers!
PS Tell me at the same time what should I do now with my MySQl, which does not want to be deleted, and does not want to be installed either.
sudo apt-get install mysql-server
Чтение списков пакетов… Готово
Построение дерева зависимостей       
Чтение информации о состоянии… Готово
Будут установлены следующие дополнительные пакеты:
  libaio1 libevent-core-2.1-6 mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-5.7 mysql-server-core-5.7
Предлагаемые пакеты:
  mailx tinyca
НОВЫЕ пакеты, которые будут установлены:
  libaio1 libevent-core-2.1-6 mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server mysql-server-5.7 mysql-server-core-5.7
Обновлено 0 пакетов, установлено 8 новых пакетов, для удаления отмечено 0 пакетов, и 4 пакетов не обновлено.
Необходимо скачать 6 398 B/20,4 MB архивов.
После данной операции, объём занятого дискового пространства возрастёт на 160 MB.
Хотите продолжить? [Д/н] Д
Пол:1 http://ru.archive.ubuntu.com/ubuntu artful/main amd64 libaio1 amd64 0.3.110-4 [6 398 B]
Получено 6 398 B за 0с (58,7 kB/s)   
Предварительная настройка пакетов ...
Выбор ранее не выбранного пакета mysql-common.
(Чтение базы данных … на данный момент установлено 191793 файла и каталога.)
Подготовка к распаковке …/0-mysql-common_5.8+1.0.2ubuntu1_all.deb …
Распаковывается mysql-common (5.8+1.0.2ubuntu1) …
Выбор ранее не выбранного пакета libaio1:amd64.
Подготовка к распаковке …/1-libaio1_0.3.110-4_amd64.deb …
Распаковывается libaio1:amd64 (0.3.110-4) …
Выбор ранее не выбранного пакета mysql-client-core-5.7.
Подготовка к распаковке …/2-mysql-client-core-5.7_5.7.22-0ubuntu0.17.10.1_amd64.deb …
Распаковывается mysql-client-core-5.7 (5.7.22-0ubuntu0.17.10.1) …
Выбор ранее не выбранного пакета mysql-client-5.7.
Подготовка к распаковке …/3-mysql-client-5.7_5.7.22-0ubuntu0.17.10.1_amd64.deb …
Распаковывается mysql-client-5.7 (5.7.22-0ubuntu0.17.10.1) …
Выбор ранее не выбранного пакета mysql-server-core-5.7.
Подготовка к распаковке …/4-mysql-server-core-5.7_5.7.22-0ubuntu0.17.10.1_amd64.deb …
Распаковывается mysql-server-core-5.7 (5.7.22-0ubuntu0.17.10.1) …
Выбор ранее не выбранного пакета libevent-core-2.1-6:amd64.
Подготовка к распаковке …/5-libevent-core-2.1-6_2.1.8-stable-4_amd64.deb …
Распаковывается libevent-core-2.1-6:amd64 (2.1.8-stable-4) …
Настраивается пакет mysql-common (5.8+1.0.2ubuntu1) …
(Чтение базы данных … на данный момент установлено 191955 файлов и каталогов.)
Подготовка к распаковке …/mysql-server-5.7_5.7.22-0ubuntu0.17.10.1_amd64.deb …
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
invoke-rc.d returned 5
There is a MySQL server running, but we failed in our attempts to stop it.
Stop it yourself and try again!
dpkg: ошибка при обработке архива /var/cache/apt/archives/mysql-server-5.7_5.7.22-0ubuntu0.17.10.1_amd64.deb (--unpack):
 подпроцесс новый сценарий pre-installation возвратил код ошибки 1
Выбор ранее не выбранного пакета mysql-server.
Подготовка к распаковке …/mysql-server_5.7.22-0ubuntu0.17.10.1_all.deb …
Распаковывается mysql-server (5.7.22-0ubuntu0.17.10.1) …
При обработке следующих пакетов произошли ошибки:
 /var/cache/apt/archives/mysql-server-5.7_5.7.22-0ubuntu0.17.10.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Answer the question

In order to leave comments, you need to log in

4 answer(s)
N
NMNH, 2018-07-01
@NMNH

It is not necessary to give commands from under the root containing rm -rf , especially from the root of the system and if there is no clear understanding of what this can lead to. The consequences can be the most enchanting: after all, no one can forbid your adviser to "make a little mistake" and you will demolish the floor of the system until rm jams ))
To reinstall, you can not delete anything, especially in such an ambiguous way, but simply install "forcibly": apt-get install --force-yes <package> .
But it would be more correct to remove the broken package using apt-get itself, and then check for dependencies and updates:
or, if that doesn't help, use dpkg
and then install again:
p.s. there is still a possibility that the problem is in the lock and status files, but this is rare.
Everything will work as soon as possible)

S
sim3x, 2018-06-30
@sim3x

sudo apt-get install -f
sudo apt-get purge mysql-server

If it doesn’t help, read the logs, what happened there
The command is written correctly like this , but naturally no one does it if there is no desire to delete their sources I advise you never to run such commands from unverified resources again

V
Vladislav Kadun, 2018-06-30
@ZXZs

Why doesn't root have enough permissions???

This could very well be. This is the intent of the one who collected the package. It is quite possible to take away some rights from the root user.
Maybe it's worth going through the processes? Surely this filthy file uses some process, which is why it does not lend itself to any actions.

R
Ruslan Fedoseev, 2018-07-01
@martin74ua

look at your leisure what the /run directory is... You don't need to go there at all.
Fix the package manager, sim3x already wrote how

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question