2012-09-06 127 views
2

我試圖在Ubuntu 12.04 LTS上部署Symphony應用程序,並且在安裝libapache2-modxslt時遇到問題。這是check_configuration.php的輸出,你可以看到XSL模塊沒有安裝。如何在Ubuntu 12.04上安裝libapache2-modxslt LTS

******************************** 
*        * 
* 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時輸入以下命令,這就是輸出結果。

[email protected]:/$ 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 

請指教。

回答

2

Debian/Ubuntu軟件包的名稱稍有不同。它應該是libapache2-mod-xslt而不是libapache2-modxslt(注意「mod」和模塊名稱之間的短劃線)。因此,嘗試

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

,因爲你需要XLS包PHP只,然後讓包管理器找到正確的依賴本身(包管理做得很好,功能強大的Debian和衍生物作爲Ubuntu的)。所以簡單地做:

sudo apt-get install php5-xsl 

並讓事情滾動。如果你好奇,你可以隨時使用即apt-cache這樣的列表軟件包的依賴關係:

sudo apt-cache depends php5-xsl 

,但如果沒有,你要安裝需要一些額外的軟件包,apt會讓你知道,並要求確認安裝額外的必需包。

+1

sudo apt-get install php5-xsl工作。謝謝,你搖滾! –

相關問題