照明クラスター設置可能

照明クラスター設置可能

私のUbuntuディストリビューションのランプスタックを設定したいのですが、問題があります。後ろに

sudo apt-get 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 '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)

何が起こったのかわかりません。この問題を解決するための提案はありますか?

答え1

@SzymonRadoszに同意します。システムを更新して再試行する必要があるようです。ただし、まだ機能しない場合は、コンポーネントを個別にダウンロードしてみることもできます。

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

Apacheサーバーのインストール

Apache Server は次の 1 行でインストールできます。

sudo apt-get install apache2

訪問してインストールをテストできます。http://ローカルホスト/ブラウザに「It Works!」というメッセージが表示されます。

MySQLサーバーのインストール

MySQL のインストールは、端末に 1 行だけ追加すればよいほど簡単です。

apt-get install mysql-server mysql-client

これにより、以下がインストールされます。

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

設置中に注意を払ってください。 MySQL root ユーザーのパスワードを生成するように求められます。その後、次のように入力/コピーして端末からサーバーにアクセスできます。

mysql -uroot -ppassword

明らかに、「password」を作成したパスワードに置き換えます(ユーザー名とパスワードの前に「-u」と「-p」を残してください)。これでログインし、「mysql>」がコマンドラインに表示され、SQLクエリを実行する準備が整いました。

PHPのインストール

PHPは3つのパッケージをインストールする必要があり、また1行だけインストールする必要があります。

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

変更を適用するには、Apacheサーバーを再起動する必要があります。

sudo service apache2 restart

これをテストするには、geditを開き、次のように入力/コピーします。

<?php
phpinfo();
?>

ファイルをinfo.phpとして保存します。次に、次のページにアクセスして、Webブラウザでファイルを閲覧します。http://localhost/info.phpをクリックすると、PHPのバージョンと残りのPHPインストール情報を示すページが表示されます。

下記のリンクからLAMPの詳細を読むことができます。

http://www.sudo-juice.com/install-lamp-server-ubuntu/

https://askubuntu.com/questions/785440/how-to-install-lamp-server-on-ubuntu

答え2

まず、このエラーを解決する必要があります。

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

oracle-java8-installerパッケージを再インストールすると、次のようになります。

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

インストールパッケージからネットワークUPD8チームリポジトリ:

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

次に、LAMP サーバーを再インストールします。

関連情報