Я пытался установить Lamp-сервер на машине Ubuntu 17.04 на пару дней , Когда я пытаюсь установить его с терминала, я получаю эту ошибку.
root@hp-pc:~# sudo apt install lamp-server^
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libhttp-message-perl' for task 'lamp-server'
Note, selecting 'libencode-locale-perl' for task 'lamp-server'
Note, selecting 'mysql-client-5.7' for task 'lamp-server'
Note, selecting 'libevent-core-2.0-5' for task 'lamp-server'
Note, selecting 'libapache2-mod-php' for task 'lamp-server'
Note, selecting 'rename' for task 'lamp-server'
Note, selecting 'mysql-server-5.7' for task 'lamp-server'
Note, selecting 'php-common' for task 'lamp-server'
Note, selecting 'libaprutil1' for task 'lamp-server'
Note, selecting 'mysql-server' for task 'lamp-server'
Note, selecting 'libcgi-fast-perl' for task 'lamp-server'
Note, selecting 'libwrap0' for task 'lamp-server'
Note, selecting 'libhttp-date-perl' for task 'lamp-server'
Note, selecting 'perl-modules-5.24' for task 'lamp-server'
Note, selecting 'liblwp-mediatypes-perl' for task 'lamp-server'
Note, selecting 'libfcgi-perl' for task 'lamp-server'
Note, selecting 'libcgi-pm-perl' for task 'lamp-server'
Note, selecting 'libaprutil1-dbd-sqlite3' for task 'lamp-server'
Note, selecting 'libaio1' for task 'lamp-server'
Note, selecting 'libio-html-perl' for task 'lamp-server'
Note, selecting 'ssl-cert' for task 'lamp-server'
Note, selecting 'libperl5.24' for task 'lamp-server'
Note, selecting 'libapr1' for task 'lamp-server'
Note, selecting 'libaprutil1-ldap' for task 'lamp-server'
Note, selecting 'libhtml-tagset-perl' for task 'lamp-server'
Note, selecting 'mysql-client-core-5.7' for task 'lamp-server'
Note, selecting 'tcpd' for task 'lamp-server'
Note, selecting 'liblua5.2-0' for task 'lamp-server'
Note, selecting 'mysql-common' for task 'lamp-server'
Note, selecting 'libhtml-template-perl' for task 'lamp-server'
Note, selecting 'libtimedate-perl' for task 'lamp-server'
Note, selecting 'perl' for task 'lamp-server'
Note, selecting 'php-mysql' for task 'lamp-server'
Note, selecting 'libhtml-parser-perl' for task 'lamp-server'
Note, selecting 'liburi-perl' for task 'lamp-server'
Note, selecting 'mysql-server-core-5.7' for task 'lamp-server'
Note, selecting 'php7.0-mysql' for task 'lamp-server'
libaio1 is already the newest version (0.3.110-3).
libapache2-mod-php is already the newest version (1:7.0+49).
libapr1 is already the newest version (1.5.2-5).
libaprutil1 is already the newest version (1.5.4-3).
libaprutil1-dbd-sqlite3 is already the newest version (1.5.4-3).
libaprutil1-ldap is already the newest version (1.5.4-3).
libcgi-fast-perl is already the newest version (1:2.12-1).
libcgi-pm-perl is already the newest version (4.35-1).
libencode-locale-perl is already the newest version (1.05-1).
libevent-core-2.0-5 is already the newest version (2.0.21-stable-3).
libfcgi-perl is already the newest version (0.78-2).
libhtml-parser-perl is already the newest version (3.72-3).
libhtml-tagset-perl is already the newest version (3.20-3).
libhtml-template-perl is already the newest version (2.95-2).
libhttp-date-perl is already the newest version (6.02-1).
libhttp-message-perl is already the newest version (6.11-1).
libio-html-perl is already the newest version (1.001-1).
liblua5.2-0 is already the newest version (5.2.4-1.1build1).
liblwp-mediatypes-perl is already the newest version (6.02-1).
libperl5.24 is already the newest version (5.24.1-2ubuntu1).
libtimedate-perl is already the newest version (2.3000-2).
liburi-perl is already the newest version (1.71-1).
libwrap0 is already the newest version (7.6.q-26).
perl is already the newest version (5.24.1-2ubuntu1).
perl-modules-5.24 is already the newest version (5.24.1-2ubuntu1).
php-common is already the newest version (1:49).
rename is already the newest version (0.20-4).
ssl-cert is already the newest version (1.0.38).
tcpd is already the newest version (7.6.q-26).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php7.0-mysql : Depends: php7.0-common (= 7.0.15-1ubuntu4) but 7.0.22-0ubuntu0.17.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.
Итак, я попытался установить пакет вручную, который показывает неудовлетворенную зависимость
root@hp-pc:~# apt install php7.0-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
php7.0-common is already the newest version (7.0.22-0ubuntu0.17.04.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
говорит, что пакет уже установлен, я попытался установить php7.0-mysql вручную.
root@hp-pc:~# apt install php7.0-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php7.0-mysql : Depends: php7.0-common (= 7.0.15-1ubuntu4) but 7.0.22-0ubuntu0.17.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.
Чтобы исправить сохраненные сломанные пакеты, я попробовал следующие команды:
root@hp-pc:~# sudo apt-get clean
root@hp-pc:~#
также
root@hp-pc:~# sudo apt update
Ign:1 http://ppa.launchpad.net/jonathonf/backports/ubuntu zesty InRelease
Get:2 https://repo.skype.com/deb stable InRelease [4,487 B]
Get:3 https://repo.skype.com/deb stable/main amd64 Packages [1,442 B]
Hit:4 http://us.archive.ubuntu.com/ubuntu zesty InRelease
Ign:5 http://ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu zesty InRelease
Ign:6 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:7 http://dl.google.com/linux/chrome/deb stable Release
Hit:8 http://ppa.launchpad.net/mozillateam/thunderbird-next/ubuntu zesty InRelease
Hit:10 http://ppa.launchpad.net/obsproject/obs-studio/ubuntu zesty InRelease
Hit:11 http://ppa.launchpad.net/papirus/papirus/ubuntu zesty InRelease
Err:12 http://ppa.launchpad.net/jonathonf/backports/ubuntu zesty Release
404 Not Found
Err:13 http://ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu zesty Release
404 Not Found
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/jonathonf/backports/ubuntu zesty Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu zesty Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
.
root@hp-pc:~# sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@hp-pc:~#
root@hp-pc:~# sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Тем не менее проблема не исправлена. Пожалуйста, совет. Спасибо заранее. Также обратите внимание, что я уже прошел этот ответ.
Удалось устранить предыдущую ошибку с помощью @zapoxkrishna. Теперь он показывает следующую ошибку.
There is a MySQL server running, but we failed in our attempts to stop it.
Stop it yourself and try again!
dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.7_5.7.20-0ubuntu0.17.04.1_amd64.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/mysql-server-5.7_5.7.20-0ubuntu0.17.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Я вручную удалил этот файл с помощью команды rm и попытался установить его снова. По-прежнему получается такая же ошибка. Просьба посоветуйте.
Возьмите резервную копию существующих источников.list и попробуйте этот sudo gedit /etc/apt/sources.list, затем удалите весь контент и создайте новый источник.list отсюда https://repogen.simplylinux.ch/ и вставьте новый сгенерированный контент в sources.list
, наконец, попробуйте обновление sudo apt-get, а затем sudo apt install lamp-server ^ он будет работать
Возьмите резервную копию существующих источников.list и попробуйте этот sudo gedit /etc/apt/sources.list, затем удалите весь контент и создайте новый источник.list отсюда https://repogen.simplylinux.ch/ и вставьте новый сгенерированный контент в sources.list
, наконец, попробуйте обновление sudo apt-get, а затем sudo apt install lamp-server ^ он будет работать