试图使用owncloud,但它说一些PHP模块未安装

时间:2018-09-08 19:43:18

标签: linux owncloud

尝试输入http://localhost/index.php

时出现此错误
PHP module zip not installed.

Please ask your server administrator to install the module.
PHP module dom not installed.

Please ask your server administrator to install the module.
PHP module XMLWriter not installed.

Please ask your server administrator to install the module.
PHP module XMLReader not installed.

Please ask your server administrator to install the module.
PHP module intl not installed.

Please ask your server administrator to install the module.
PHP module libxml not installed.

Please ask your server administrator to install the module.
PHP module mb multibyte not installed.

Please ask your server administrator to install the module.
PHP module GD not installed.

Please ask your server administrator to install the module.
PHP module SimpleXML not installed.

Please ask your server administrator to install the module.
PHP module cURL not installed.

Please ask your server administrator to install the module.
PHP modules have been installed, but they are still listed as missing?

Please ask your server administrator to restart the web server.

安装了owncloud的地方,我尝试了以下命令:

apt-get install -y apache2 mariadb-server libapache2-mod-php7.0     openssl php-imagick php7.0-common php7.0-curl php7.0-gd     php7.0-imap php7.0-intl php7.0-json php7.0-ldap php7.0-mbstring     php7.0-mcrypt php7.0-mysql php7.0-pgsql php-smbclient php-ssh2     php7.0-sqlite3 php7.0-xml php7.0-zip

但是它给了我一些奇怪的错误:

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:
mariadb-server : Depends: mariadb-server-10.1 (>= 1:10.1.34-0ubuntu0.18.04.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我不知道该怎么办...我搜索了所有互联网,但没有找到答案...

1 个答案:

答案 0 :(得分:1)

第一部分,您需要安装几个PHP模块:

apt install -y apache2 mariadb-server libapache2-mod-php7.0 \
php7.0-gd php7.0-json php7.0-mysql php7.0-curl \
php7.0-intl php7.0-mcrypt php-imagick \
php7.0-zip php7.0-xml php7.0-mbstring

对于第二部分,看来您拥有apt上的固定包。您需要找出持有哪个包裹:

 sudo aptitude why-not mariadb-server

保留软件包的原因有很多,要做什么取决于保留软件包的原因。通常,一旦知道了为什么要保留它并确定了可以取消保留它的原因,就可以了:

sudo apt-mark unhold package_name

如果您不知道为什么要保留它,可以尝试修复损坏的依赖关系,但是如果有确凿理由必须保留它,那就不好了:

sudo apt-get install mariadb-server --fix-missing --fix-broken

如果您正在托管中,则托管服务器可能会将其保留,因此基本上可以跳过mariadb的安装,因为它似乎已安装在以前的版本中。