linux - 尝试使用 owncloud 但它说一些 php 模块未安装

标签 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.

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

最佳答案

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

关于linux - 尝试使用 owncloud 但它说一些 php 模块未安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52238817/

相关文章:

c++ - 当.so是纯c的时候,用c++/shell脚本写核心主程序是不是一个好的设计?

php - ownCloud 使用短期 token 或类似文件共享文件?

linux - Windows 的数据权限 Docker

c - 如何用 C 语言读取/写入现有的 TAP 接口(interface)

php - Magento 扩展 404 错误

c++ - 如何将 Linux 可执行文件添加到 .gitignore?

ubuntu - 使用 nginx 配置 owncloud 的 Fastcgi 参数

python - 使用 easy webdav 时如何验证我的自签名证书?

linux - Docker 无效标签值

python - 尝试读取 DBM 文件