我不太確定這個問題是否屬於這個論壇,如果不是這樣,你即將關閉這個問題,請提出一個建議,在哪裏可以問這個問題。如何修復爲安裝phpunit而安裝pear時出錯?
基本上,我需要在Ubuntu 12.04上安裝phpunit
。與該數據包經理這樣我跑phpunit
時出現錯誤:
PHP Fatal error: require_once(): Failed opening required 'PHP/CodeCoverage/Filter.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/bin/phpunit on line 38
對其中有solutions,即與pear
安裝phpunit
。
繼pear install instructions我下載並運行go-pear.phar
,這本身會產生一個錯誤
PHP Notice: Uninitialized string offset: 0 in phar:///home/alexander/opt/src/go-pear.phar/Console/Getopt.php on line 145
任何建議如何從這裏出發?我也只需要phpunit
,所以pear
將只用於這種情況一次。
什麼是命令行語句使用?我必須安裝作曲家嗎? – Alex
是的,你需要安裝composer並運行'composer install'或者'composer update',它將使用這個composer.json文件作爲依賴描述(這些名字將通過packagist服務器解析到相關的URL) –
嗯,我嘗試了鏈,但'phpunit'與以前一樣給出確切的錯誤。 – Alex