2013-01-23 49 views
2

我正在使用Mac OS X Lion 10.7.5,我想清除一件事情,我不想再使用XAMPP,MAMP。PHP mcrypt安裝和設置laravel環境問題

所以我啓用了apache,php並安裝了mysql後面的這個link。這很好。然後我下載了laravel並按照這個link安裝它。我根據第一個鏈接教程創建了Sites文件夾裏面的laravel文件夾。現在,當我在public文件夾中單擊laravel文件夾內它給了我下面的錯誤

Unhandled Exception 

Message: 

Call to undefined function Laravel\mcrypt_create_iv() 
Location: 

/Users/zafarsaleem/Sites/learning-laravel/laravel/crypter.php on line 36 

然後檢查是否mcrypts安裝在phpinfo()函數。他們不在那裏。要安裝mcrypt我跟着這個link。它的工作,直到當我跟着PHP Extension標題。當我下載解壓PHP 5.3.8 is now the default since Mac OS X 10.7.3當我發出命令phpize它給了我這個錯誤

Cannot find config.m4. 
Make sure that you run '/usr/bin/phpize' in the top level source directory of the module 

這是什麼top level source directory of the module means?如何使mcrypt正確安裝以使laravel正常工作?請幫忙。

+1

我可以解決我的問題錯誤請點擊此鏈接的http:// stackoverflow.com/questions/12479983/cant-find-mcrypt-call-to-undefined-function-laravel-mcrypt-create-iv/14225704#14225704 – Sophy

+0

apt-get'在os x lion上不起作用。 – 2619

+0

'apt-get'是debian包管理器,當然它在OSX上不起作用;)你已經在錯誤的目錄中調用了phpize,你必須從PHP源代碼的'ext/mcrypt'目錄運行它。 – dualed

回答