2016-04-26 163 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