2013-03-13 56 views
0

我希望能夠使用phar命令行工具(在Debian Linux上),如this manpage上所述。如何從PHP源代碼獲取可執行的phar命令?

什麼我迄今所做的:

  1. 下載的PHP PHAR source folder;

  2. 將其移動到/usr/share/; (指向PHP符號鏈接 - >到PHP可執行文件的路徑);將phar.php的第一行從#!/usr/local/bin/php更改爲#!/usr/bin/php(PHP符號鏈接 - >到PHP可執行文件的路徑);第一行是phar.php

  3. 創建了符號鏈接phar/usr/share/phar/phar.php

現在phar help返回一個錯誤:

# phar help 
PHP Fatal error: Uncaught exception 'PharException' with message 'manifest cannot be larger than 100 MB in phar "/usr/share/phar/phar.php"' in /usr/share/phar/phar.php:48 
Stack trace: 
#0 /usr/share/phar/phar.php(48): Phar::mapPhar() 
#1 {main} 
    thrown in /usr/share/phar/phar.php on line 48 

我在做什麼錯?如何讓它工作?

Thx

+0

它的工作原理! S. [this comment](http://stackoverflow.com/questions/15373638/how-to-get-where-to-obtain-the-php-phar-command-line-tool#comment21793827_15373638)到問題「[如何獲取PHP Phar命令行工具?工具)」。 – automatix 2013-03-15 15:20:44

回答

0

可能是一個損壞的phar文件。嘗試再次下載。