2

我正在尝试在 ubuntu 12.04 LTS 上部署交响乐应用程序,但在安装 libapache2-modxslt 时遇到问题。这是 check_configuration.php 的输出,您可以看到未安装 XSL 模块。

********************************
*                              *
*  symfony requirements check  *
*                              *
********************************    
php.ini used by PHP: /etc/php5/apache2/php.ini    

** Mandatory requirements **    
  OK        PHP version is at least 5.2.4 (5.3.10-1ubuntu3.2)

** Optional checks **    
  OK        PDO is installed
  OK        PDO has some drivers installed: mysql
  OK        PHP-XML module is installed
[[WARNING]] XSL module is installed: FAILED
            *** Install and enable the XSL module (recommended for Propel) ***
  OK        The token_get_all() function is available
  OK        The mb_strlen() function is available
  OK        The iconv() function is available
  OK        The utf8_decode() is available
  OK        The posix_isatty() is available
[[WARNING]] A PHP accelerator is installed: FAILED
            *** Install a PHP accelerator like APC (highly recommended) ***
[[WARNING]] php.ini has short_open_tag set to off: FAILED
            *** Set it to off in php.ini ***
  OK        php.ini has magic_quotes_gpc set to off
  OK        php.ini has register_globals set to off
  OK        php.ini has session.auto_start set to off
  OK        PHP version is not 5.2.9

我输入了以下命令来尝试安装 libapache2-modxslt,这就是输出。

mark@ubuntu:/$ sudo apt-get install libapache2-modxslt php5-xsl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libapache2-modxslt

请指教。

4

1 回答 1

2

Debian/Ubuntu 软件包的名称略有不同。它应该libapache2-mod-xslt不是libapache2-modxslt(注意“mod”和模块名称之间的破折号)。所以试试

sudo apt-get install libapache2-mod-xslt php5-xsl

但是,由于您只需要 PHP 的 XLS 包,那么只需让包管理器自己找到正确的依赖项(包管理在 Debian 和 Ubuntu 等衍生产品上做得很好并且功能强大)。所以只需这样做:

sudo apt-get install php5-xsl

让事情发展。如果你很好奇,你总是可以使用 ie 列出包依赖项,apt-cache如下所示:

sudo apt-cache depends php5-xsl

但如果不是,您要安装的软件包将需要额外的东西,apt会让您知道并要求确认安装额外的必需软件包。

于 2012-09-06T18:37:14.433 回答