Php 如何在Ubuntu 12.04 LTS上安装libapache2 modxslt

Php 如何在Ubuntu 12.04 LTS上安装libapache2 modxslt,php,ubuntu,symfony1,Php,Ubuntu,Symfony1,我试图在ubuntu 12.04 LTS上部署symphony应用程序,但在安装libapache2 modxslt时遇到问题。下面是check_configuration.php的输出,您可以看到没有安装XSL模块 ******************************** * * * symfony requirements check * * * *********

我试图在ubuntu 12.04 LTS上部署symphony应用程序,但在安装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

请告知。

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

但是,因为您只需要用于PHP的XLS包,所以只需让包管理器自己找到正确的依赖项即可(包管理在Debian和Ubuntu等衍生工具上做得很好,功能强大)。因此,只要做:

sudo apt-get install php5-xsl
让事情继续下去。如果您很好奇,您可以使用如下方式列出包依赖项,即
apt cache

sudo apt-cache depends php5-xsl
但如果没有,并且您将要安装的软件包需要额外的东西,
apt
会让您知道并要求确认是否安装了所需的其他软件包

sudo apt-cache depends php5-xsl