【问题标题】:How to install/enable Tidy extension in PHP 7.2 on Ubuntu 14.04?如何在 Ubuntu 14.04 上的 PHP 7.2 中安装/启用 Tidy 扩展?
【发布时间】:2020-03-07 03:50:37
【问题描述】:

问题:

使用 tidy_parse_string() 返回:

调用未定义的函数

试过了:

搜索:

apt-cache search tidy

但我只在返回的列表中看到这个 php 扩展:

php5-tidy - php5 的整洁模块

如何安装 PHP 7.2 的模块?

我已尝试通过删除 ;:

在 fpm 7.2 文件夹中的 php ini 中启用该模块

;扩展=整洁

但是没有指向扩展的路径,所以我猜它还没有安装。

线索: Tidy 自己的页面说您使用“配置选项”进行安装 - 我不知道这与 apt 安装的软件包有什么关系。

https://www.php.net/manual/en/tidy.installation.php

阐述:

这里列出了包:

https://packages.ubuntu.com/disco/php7.2-tidy

但在搜索 apt-get 时它不会显示,即使在更新列表后也是如此。只显示 php5 扩展?

【问题讨论】:

    标签: php php-7 php-extension tidy


    【解决方案1】:

    您好,我使用以下命令安装 tidy:

    apt-cache search php7.2-tidy
    apt-get update
    apt-get -y install php7.2-tidy
    

    【讨论】:

    • 嗨“apt-cache search php7.2-tidy”什么也不返回。在我“apt-get update”之后,我仍然什么也得不到,所以安装给了我“E:通过正则表达式 'php7.2-tidy' 找不到任何包”。在搜索 tidy 时,我仍然只看到“php5-tidy - php5 的 tidy 模块”?即使我更新它,它也不存在于包列表中。我可以在这里看到这个包,但它没有出现在 apt 列表中:packages.ubuntu.com/disco/php7.2-tidy
    • 你确定你使用的是php7.2吗?
    • 是的。 "php -v" 返回 PHP 7.2.2-3+ubuntu14.04.1+deb.sury.org+1 (cli)
    猜你喜欢
    • 1970-01-01
    • 2016-01-30
    • 2018-09-29
    • 2013-01-08
    • 2018-10-30
    • 2013-12-16
    • 1970-01-01
    • 2013-12-17
    • 1970-01-01
    相关资源
    最近更新 更多