Habilitar para instalar a pilha da lâmpada

0

Eu quero configurar a pilha da lâmpada para minha distro do ubuntu, mas tenho alguns problemas. Depois

sudo apt-get install lamp-server^

Eu recebo:

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 'php7.0-cli' for task 'lamp-server'
Note, selecting 'mysql-client-5.7' 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 'php7.0-opcache' 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.22' 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 'php7.0-common' 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 'apache2-data' for task 'lamp-server'
Note, selecting 'libperl5.22' 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 'php7.0-json' for task 'lamp-server'
Note, selecting 'php7.0-readline' for task 'lamp-server'
Note, selecting 'tcpd' for task 'lamp-server'
Note, selecting 'liblua5.1-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 'apache2-bin' for task 'lamp-server'
Note, selecting 'perl' for task 'lamp-server'
Note, selecting 'apache2' for task 'lamp-server'
Note, selecting 'php-mysql' for task 'lamp-server'
Note, selecting 'apache2-utils' for task 'lamp-server'
Note, selecting 'libhtml-parser-perl' for task 'lamp-server'
Note, selecting 'libapache2-mod-php7.0' 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-2).
libapache2-mod-php is already the newest version (1:7.0+35ubuntu6).
libapr1 is already the newest version (1.5.2-3).
libaprutil1 is already the newest version (1.5.4-1build1).
libaprutil1-dbd-sqlite3 is already the newest version (1.5.4-1build1).
libaprutil1-ldap is already the newest version (1.5.4-1build1).
libcgi-fast-perl is already the newest version (1:2.10-1).
libcgi-pm-perl is already the newest version (4.26-1).
libencode-locale-perl is already the newest version (1.05-1).
libfcgi-perl is already the newest version (0.77-1build1).
libhtml-parser-perl is already the newest version (3.72-1).
libhtml-tagset-perl is already the newest version (3.20-2).
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.1-0 is already the newest version (5.1.5-8ubuntu1).
liblwp-mediatypes-perl is already the newest version (6.02-1).
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-25).
php-common is already the newest version (1:35ubuntu6).
php-mysql is already the newest version (1:7.0+35ubuntu6).
rename is already the newest version (0.20-4).
ssl-cert is already the newest version (1.0.37).
tcpd is already the newest version (7.6.q-25).
apache2 is already the newest version (2.4.18-2ubuntu3.5).
apache2-bin is already the newest version (2.4.18-2ubuntu3.5).
apache2-data is already the newest version (2.4.18-2ubuntu3.5).
apache2-utils is already the newest version (2.4.18-2ubuntu3.5).
libapache2-mod-php7.0 is already the newest version (7.0.22-0ubuntu0.16.04.1).
libperl5.22 is already the newest version (5.22.1-9ubuntu0.2).
mysql-client-5.7 is already the newest version (5.7.20-0ubuntu0.16.04.1).
mysql-client-core-5.7 is already the newest version (5.7.20-0ubuntu0.16.04.1).
mysql-common is already the newest version (5.7.20-0ubuntu0.16.04.1).
mysql-server is already the newest version (5.7.20-0ubuntu0.16.04.1).
mysql-server-5.7 is already the newest version (5.7.20-0ubuntu0.16.04.1).
mysql-server-core-5.7 is already the newest version (5.7.20-0ubuntu0.16.04.1).
perl is already the newest version (5.22.1-9ubuntu0.2).
perl-modules-5.22 is already the newest version (5.22.1-9ubuntu0.2).
php7.0-cli is already the newest version (7.0.22-0ubuntu0.16.04.1).
php7.0-common is already the newest version (7.0.22-0ubuntu0.16.04.1).
php7.0-json is already the newest version (7.0.22-0ubuntu0.16.04.1).
php7.0-mysql is already the newest version (7.0.22-0ubuntu0.16.04.1).
php7.0-opcache is already the newest version (7.0.22-0ubuntu0.16.04.1).
php7.0-readline is already the newest version (7.0.22-0ubuntu0.16.04.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up mysql-server-5.7 (5.7.20-0ubuntu0.16.04.1) ...
Renaming removed key_buffer and myisam-recover options (if present)
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since sob 2018-01-20 10:55:17 CET; 17ms ago
  Process: 4551 ExecStartPost=/usr/share/mysql/mysql-systemd-start post (code=exited, status=0/SUCCESS)
  Process: 4550 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
  Process: 4542 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 4550 (code=exited, status=1/FAILURE)

sty 20 10:55:17 len-machine systemd[1]: Failed to start MySQL Community Server.
sty 20 10:55:17 len-machine systemd[1]: mysql.service: Unit entered failed s....
sty 20 10:55:17 len-machine systemd[1]: mysql.service: Failed with result 'e....
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up oracle-java8-installer (8u151-1~webupd8~0) ...
Using wget settings from /var/cache/oracle-jdk8-installer/wgetrc
Downloading Oracle Java 8...
--2018-01-20 10:55:18--  http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 104.104.142.192
Connecting to download.oracle.com (download.oracle.com)|104.104.142.192|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz [following]
--2018-01-20 10:55:18--  https://edelivery.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 2a02:26f0:d8:39a::2d3e, 2a02:26f0:d8:389::2d3e, 104.81.108.164
Connecting to edelivery.oracle.com (edelivery.oracle.com)|2a02:26f0:d8:39a::2d3e|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz?AuthParam=1516442239_54c9d78d4d9e3a8f11df3af6b410580b [following]
--2018-01-20 10:55:19--  http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz?AuthParam=1516442239_54c9d78d4d9e3a8f11df3af6b410580b
Connecting to download.oracle.com (download.oracle.com)|104.104.142.192|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-01-20 10:55:20 ERROR 404: Not Found.

download failed
Oracle JDK 8 is NOT installed.
dpkg: error processing package oracle-java8-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
 mysql-server-5.7
 oracle-java8-installer
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Eu não tenho ideia do que está acontecendo. Você tem algumas dicas de como resolver isso?

    
por Szymon Radosz 20.01.2018 / 11:02

2 respostas

0

Concordo com o @SzymonRadosz. Acho que você deveria atualizar seu sistema e tentar novamente. Mas se ainda não funcionar, você também pode tentar baixar os componentes individualmente.

LAMP Server is a collection of open source software used to create a web server. The collection consists of:

    Linux – the operating system
    Apache server – the server
    MySQL – the database system
    PHP – the programming language

Instalando o Apache Server

O Apache Server pode ser instalado em uma linha:

sudo apt-get install apache2

Você pode testar a instalação visitando o link em um navegador, você verá uma massagem dizendo: "Funciona!".

Instalando o servidor MySQL

Instalar o MySQL é tão simples quanto uma outra linha no terminal:

apt-get install mysql-server mysql-client

Isso instala:

MySQL Server – to store/serve your database
MySQL Client – a client to access your MySQL server

Certifique-se de prestar atenção durante a instalação. Você será solicitado a criar uma senha para o usuário root do MySQL. Você pode acessar o servidor no terminal digitando / copiando:

mysql -uroot -ppassword

Obviamente, substitua "senha" pela senha que você acabou de criar (deixe o "-u" e "-p" antes do seu nome de usuário e senha). Agora você deve estar logado e estar exibindo "mysql > 'em sua linha de comando, pronto para suas consultas SQL!

Instalando o PHP

O PHP requer que 3 pacotes sejam instalados, novamente sua única linha:

sudo apt-get install php5 libapache2-mod-php5 php5-mysql

Você deve reiniciar seu servidor Apache agora para que as mudanças entrem em vigor:

sudo service apache2 restart

Para testar isso, abra gedit e digite / copy:

<?php
phpinfo();
?>

Salve o arquivo como info.php. Agora navegue até este arquivo em seu navegador, visitando o link , você deverá ver uma página mostrando sua versão do PHP e o resto de suas informações de instalação do PHP .

Você pode ler mais em LAMP com os links fornecidos abaixo:

link

link

    
por 20.01.2018 / 17:46
0

Você deve resolver este erro primeiro:

download failed
Oracle JDK 8 is NOT installed.
dpkg: error processing package oracle-java8-installer (--configure):
 subprocess installed post-installation script returned error exit status 1

Por meio da reinstalação do pacote oracle-java8-installer :

sudo dpkg --configure -a
sudo apt-get purge --remove oracle-java8-installer

Instalando o pacote do repositório webupd8team :

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

Em seguida, reinstale o servidor LAMP.

    
por 20.01.2018 / 19:10

Tags