Mysql、mysql-server、Apache2などをインストールしました。この問題を引き起こす間違ったPPAまたはプログラムをインストールした可能性があります。基本的に、ローカルサーバーを実行する必要があります(例:wordpress用)。したがって、localhost/phpmyadminにする必要があります。どういうわけかlocalhostは動作しています(デフォルトページを表示しています)が、localhost/phpmyadminは動作していません。
Sudo apt-get install phpmyadmin
を実行しようとすると、次の出力が表示されます
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:
phpmyadmin : Depends: libapache2-mod-php5 but it is not going to be installed or
libapache2-mod-php5filter but it is not going to be installed or
php5-cgi but it is not going to be installed or
php5-fpm but it is not going to be installed or
php5 but it is not going to be installed
Depends: php5-mysql but it is not going to be installed or
php5-mysqli but it is not installable or
php5-mysqlnd but it is not going to be installed
Depends: php-gettext but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Sudo apt-get install php5 libapache2-mod-php5
を試してみると、次のエラーが表示されます
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:
libapache2-mod-php5 : Depends: php5-common (= 5.5.9+dfsg-1ubuntu4.5) but 5.5.9+dfsg-1ubuntu4.14 is to be installed
Recommends: php5-cli but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
繰り返しますが、不足しているphps-commonをSudo apt-get install php5-commom
でインストールしようとしましたが、php5-commonはすでに最新バージョンであることを示しています。出力は次のとおりです。
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:
libapache2-mod-php5 : Depends: php5-common (= 5.5.9+dfsg-1ubuntu4.5) but 5.5.9+dfsg-1ubuntu4.14 is to be installed
Recommends: php5-cli but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
maddy@maddy-PC:/$ Sudo apt-get install php5-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
php5-common is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
だから、皆さん、phpmyadminをインストールするためにあなたの助けが必要です。
UPDATEこれはgrep -R --include '*.list' '^deb ' /etc/apt
の出力です
/etc/apt/sources.list:deb cdrom:[Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta AMD64 (20150805)]/ trusty main restricted
/etc/apt/sources.list:deb http://ubuntu.excellmedia.net/archive/ trusty main restricted
/etc/apt/sources.list:deb http://ubuntu.excellmedia.net/archive/ trusty-updates main restricted
/etc/apt/sources.list:deb http://ubuntu.excellmedia.net/archive/ trusty universe
/etc/apt/sources.list:deb http://ubuntu.excellmedia.net/archive/ trusty-updates universe
/etc/apt/sources.list:deb http://ubuntu.excellmedia.net/archive/ trusty multiverse
/etc/apt/sources.list:deb http://ubuntu.excellmedia.net/archive/ trusty-updates multiverse
/etc/apt/sources.list:deb http://ubuntu.excellmedia.net/archive/ trusty-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://ubuntu.excellmedia.net/archive/ trusty-security main restricted
/etc/apt/sources.list:deb http://ubuntu.excellmedia.net/archive/ trusty-security universe
/etc/apt/sources.list:deb http://ubuntu.excellmedia.net/archive/ trusty-security multiverse
/etc/apt/sources.list:deb http://extras.ubuntu.com/ubuntu trusty main
/etc/apt/sources.list:deb http://deb.torproject.org/torproject.org trusty main
/etc/apt/sources.list.d/upubuntu-com-office-trusty.list:deb http://ppa.launchpad.net/upubuntu-com/office/ubuntu trusty main
/etc/apt/sources.list.d/google.list:deb http://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list.d/webupd8team-sublime-text-3-trusty.list:deb http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu trusty main
/etc/apt/sources.list.d/webupd8team-Java-trusty.list:deb http://ppa.launchpad.net/webupd8team/Java/ubuntu trusty main
/etc/apt/sources.list.d/google-chrome.list:deb http://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list.d/cordova-ubuntu-ppa-trusty.list:deb http://ppa.launchpad.net/cordova-ubuntu/ppa/ubuntu trusty main
/etc/apt/sources.list.d/webupd8team-tor-browser-trusty.list:deb http://ppa.launchpad.net/webupd8team/tor-browser/ubuntu trusty main
/etc/apt/sources.list.d/nodesource.list:deb https://deb.nodesource.com/node_5.x trusty main
/etc/apt/sources.list.d/ubuntu-wine-ppa-trusty.list:deb http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu trusty main
apt-cache policy php5-common
の出力
php5-common:
Installed: 5.5.9+dfsg-1ubuntu4.14
Candidate: 5.5.9+dfsg-1ubuntu4.14
Version table:
*** 5.5.9+dfsg-1ubuntu4.14 0
100 /var/lib/dpkg/status
5.5.9+dfsg-1ubuntu4.5 0
500 http://ubuntu.excellmedia.net/archive/ trusty-updates/main AMD64 Packages
500 http://ubuntu.excellmedia.net/archive/ trusty-security/main AMD64 Packages
5.5.9+dfsg-1ubuntu4 0
500 http://ubuntu.excellmedia.net/archive/ trusty/main AMD64 Packages
PDATE 2これはaptitude search '?narrow(?installed, !?version(CANDIDATE))'
の出力です
W: Duplicate sources.list entry http://dl.google.com/linux/chrome/deb/ stable/main AMD64 Packages (/var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_main_binary-AMD64_Packages)
W: Duplicate sources.list entry http://dl.google.com/linux/chrome/deb/ stable/main i386 Packages (/var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_main_binary-i386_Packages)
W: You may want to update the package lists to correct these missing files
i google-chrome-stable - The web browser from Google
i nodejs - Node.js event-based server-side javascript
i Oracle-Java8-installer - Oracle Java(TM) Development Kit (JDK) 8
i Oracle-Java8-set-default - Set Oracle JDK 8 as default Java
i tor-browser - Tor Browser Bundle
php5-common
のインストール済みバージョンは、インストールするパッケージと互換性がありません。
その理由は、おそらくあなたが追加したPPAであり、それからphp5-common
(およびおそらく他のパッケージ)の新しいバージョンをインストールし、再びPPAを削除または無効にしたためです。
今やらなければならないのは、それらの「あまりにも新しい」バージョンをパッケージキャッシュから削除して、偶発的な再インストールを防止し、php5-common
パッケージを公式リポジトリから入手可能なバージョンにダウングレードすることです。
Sudo apt-get clean
Sudo apt-get install php5-common=5.5.9+dfsg-1ubuntu4.5
それがまだ機能しない場合にのみ、以下のコマンドを実行します。最後のものは上記と同じです。
Sudo rm -rf /var/lib/apt/lists
Sudo apt-get update
Sudo apt-get install php5-common=5.5.9+dfsg-1ubuntu4.5