java - 每当我运行 "apt-get install php5-gd php-mysql"时,它都会在 Ubuntu 14.04 上显示 "Unable to locate package php-mysql"

标签 java php mysql oracle ubuntu

我正在尝试运行命令

apt-get install php5-gd php-mysql

但每当我运行命令时,它都会指出:

E: Unable to locate package php-mysql

我的专用服务器运行的是 Ubuntu 14.04,它由 So You Start 托管。

问题是,它之前与 java、mysql 和 php 一起工作。 这是否可能只是需要修复的更大问题的副作用?当我尝试安装 java 时,显示如下:

apt-get install openjdk-7-jre-headless
Reading package lists... Done
Building dependency tree
Reading state information... Done
openjdk-7-jre-headless is already the newest version.
The following packages were automatically installed and are no longer                        required:
libdbi-perl libterm-readkey-perl mysql-client-core-5.5
Use 'apt-get autoremove' to remove them.
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
2 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 oracle-java8-installer (8u121-1~webupd8~0) ...
Installing from local file /var/cache/oracle-jdk8-installer/jdk-8u121-linux-           x64.tar.gz
Removing outdated cached downloads...
update-alternatives: using /usr/lib/jvm/java-8-oracle/jre/bin/ControlPanel     to provide /usr/bin/ControlPanel (ControlPanel) in auto mode
update-alternatives: error: error creating symbolic link     `/etc/alternatives/ControlPanel.dpkg-tmp': No such file or directory
No apport report written because the error message indicates it's a follow-    up error from a previous failure.
                        dpkg: error processing package oracle-java8-    installer (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of oracle-java8-set-default:
 oracle-java8-set-default depends on oracle-java8-installer; however:
  Package oracle-java8-installer is not configured yet.

dpkg: error processing package oracle-java8-set-default (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 oracle-java8-installer
 oracle-java8-set-default
E: Sub-process /usr/bin/dpkg returned an error code (1)

最佳答案

我在14.04,php5-mysql没问题:

$ apt-cache search php5-mysql
php5-mysql - MySQL module for php5
php5-mysqlnd - MySQL module for php5 (Native Driver)
php5-mysqlnd-ms - MySQL replication and load balancing module for PHP

尝试先进行更新,然后再进行安装:

sudo apt-get update
sudo apt-get install php5-mysql

关于java - 每当我运行 "apt-get install php5-gd php-mysql"时,它都会在 Ubuntu 14.04 上显示 "Unable to locate package php-mysql",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41968360/

相关文章:

java - 使用 LDT 时出现子记录错误

java - Java 有哪些突出的实际应用程序?

javascript - 表单输入的字符计数器 - 不计数

mysql - 使用一个搜索框搜索数据库中的不同项目

java - 将内存中的类日志重定向到 ObjectOutputStream

java - DB2 和 ResultSetMetaData - 无法获取列名称

php - 使用Git和Composer处理PHP框架的组件之间的依赖关系的最佳方法

php - 确认和取消按钮 Laravel Sweet Alert

php - 如何将元素 id 放入 PHP 变量中

mysql - 为什么我不能以这种方式创建表?