2016-04-26 69 views
0

我正在使用Ubuntu的XAMPP,而我做的PHP工匠遷移,這表明PDO Exception could not find driverLaravel - PHP工匠遷移問題 - 司機沒有發現 - Ubuntu的

然後以修復

我發現我安裝MBSTRING ,php_curl等,我已經安裝了MBSTRING,然後同時安裝php_curl我有錯誤無法找到

[email protected]:/home/allau# sudo apt-get install php5-curl 
Reading package lists... Done 
Building dependency tree  
Reading state information... Done 
E: Unable to locate package php5-curl 

當我鍵入PHP --ini它呈現出以下

[email protected]:/home/allau# php --ini 
Configuration File (php.ini) Path: /etc/php/7.0/cli 
Loaded Configuration File:   /etc/php/7.0/cli/php.ini 
Scan for additional .ini files in: /etc/php/7.0/cli/conf.d 
Additional .ini files parsed:  /etc/php/7.0/cli/conf.d/10-opcache.ini, 

但是我在ubuntu上使用xampp,我想它指向/etc/php/7.0的php.ini,但是我想使用/ opt/lampp的php,我該怎麼做?

幫助請

+0

如果你想改變什麼PHP它使用,將其添加到您的拍拍h,所以修改〜/ .bashrc並將路徑添加到您要使用的php – odannyc

回答

1

PHP,你通過CLI使用是從正在使用的XAMPP的不同。 XAMPP帶來了自己的PHP,如果你想運行通過CLI是一個而不是一個你可能與Ubuntu了,那麼你應該將它添加到您的PATH:

nano ~/.bashrc

然後在添加此行文件尾:

export PATH=/opt/lampp/bin:$PATH

...並保存(ctrl+o - >enter - >ctrl+x