尝试使用OwnCloud,但它说一些PHP模块未安装



我在尝试输入 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.

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

对于第一部分,您需要安装几个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安装,因为它似乎安装在以前的版本上。

相关内容

  • 没有找到相关文章