我已经安装了 ubuntu 和 Windows 10(双启动)。我已经设置了 apache2 服务器、mysql 并安装了 PHP 7,然后我想安装 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: php5-mcrypt but it is not going to be installed
Depends: php5-json but it is not going to be installed
Depends: php-gettext but it is not going to be installed
Recommends: php5-gd but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
它说我的包裹坏了,我真的不知道该怎么修复。请帮忙!
提前谢谢了。
答案1
您可以检查微软。它将安装所有这些。它也适用于 ubuntu。
下载 .run 文件并像这样安装
chmod 755 xampp-linux-*-installer.run
sudo ./xampp-linux-*-installer.run
此后,您可以像这样运行它。
sudo /opt/lampp/lampp start
并停止
sudo /opt/lampp/lampp stop
这将运行其命令行工具。它还有图形工具。可以像这样运行。
cd /opt/lampp
sudo ./manager-linux.run (or manager-linux-x64.run)
答案2
您可以尝试安装 php7,然后安装 phpmyadmin,这对我在 Ubuntu 14.04 上有效。
sudo apt-add-repository ppa:ondrej/php -y
sudo apt-get update
sudo apt-get install -y php7.0-common php7.0-cli php7.0-fpm php7.0-curl php7.0-sqlite3 php7.0-json php7.0-tidy php7.0-mysql
sudo apt-get install -y phpmyadmin