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

时间:2012-09-06 17:27:14

标签: php ubuntu symfony1

我正在尝试在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

请告知。

1 个答案:

答案 0 :(得分: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会通知您并要求确认安装其他必需的软件包。