Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
627 views
in Technique[技术] by (71.8m points)

Cannot install laravel oci8

the composer require yajra/laravel-oci8:^8 command is giving me the following error:

C:Usersy?PhpstormProjectsBRP>composer require yajra/laravel-oci8:^8
./composer.json has been updated
Running composer update yajra/laravel-oci8
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires yajra/laravel-oci8 8 -> satisfiable by yajra/laravel-oci8[v8.0.0].
    - yajra/laravel-oci8 v8.0.0 requires ext-oci8 >=2.0.0 -> it is missing from your system. Install or enable PHP's oci8 extension.

To enable extensions, verify that they are enabled in your .ini files:
    - C:PHP74php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

Windows 10
PHP 7.4.6
Laravel 8.26.1
PHP Storm 2020.2.3

I am not using XAMMP or WAMP

I hope someone can help me out. Thank you in advance.

question from:https://stackoverflow.com/questions/66060079/cannot-install-laravel-oci8

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You are missing the OCI8 PHP extension, So follow these steps:

  1. From http://pecl.php.net/package/oci8 download exact version, for you must be php_oci8-2.2.0, unzip it and copy to PHP ext folder, for you its in "C:php74ext"

  2. Un-Comment "extension=php_oci8_11g.dll" in php.ini and restart Apache or any other web server that you are using

  3. Check php_info(), oci8 should be enabled.

  4. Run composer require yajra/laravel-oci8:^8 command again.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...