Problem installing OCI8 in a Vagrant vm

Asked

Viewed 881 times

2

I created a VM with the Laravel Homestead I need to install the IOC8 in it:

I turn the remote sudo pecl install oci8 as you report here

But I get that mistake:

ERROR: `/tmp/Pear/temp/oci8/configure --with-php-config=/usr/bin/php-config --with-oci8' failed

I’m using PHP 7.1.0 I don’t know if it has anything to do with.

1 answer

3


Basically I followed a tutorial (in English), I will pass it to the answer and link to the end of the answer:

Installing the Oracle Instant Client

first step:

Download the Oracle Instant Client and SDK from the Oracle website. Be sure to choose the correct architecture for the installation(32bit x86, 64bit x86_64). You will need to upload the files to your server using any method that suits you.

second step:

Create a new folder to store zip files from Oracle Instant Client on your server.

Running the command:

sudo mkdir /opt/oracle

third step:

Now extract the files:

cd /opt/oracle

sudo unzip instantclient-basic-linux-12.1.0.2.0.zip

sudo unzip instantclient-sdk-linux-12.1.0.2.0.zip

fourth step:

Create a symbolic link to the Instant Client.

ln -s /opt/oracle/instantclient_12_1/libclntsh.so.12.1 /opt/oracle/instantclient_12_1/libclntsh.so

ln -s /opt/oracle/instantclient_12_1/libocci.so.12.1 /opt/oracle/instantclient_12_1/libocci.so

fifth step: (at that stage I needed to change the permissions on ld.so.conf.d with sudo chmod 777)

Add the folder to the ldconfig

echo /opt/oracle/instantclient_12_1 > /etc/ld.so.conf.d/oracle-instantclient

sixth step:

Update the dynamic linkage execution time links

sudo ldconfig

Installation of the OCI8

first step: (I didn’t do this step, I used the php 7.1.1)

Run these commands to install php-dev:

sudo apt-get install php-pear php5-dev build-essential libaio1

second step:

Once installed, we need to get the OCI8 file.

pecl install oci8-2.0.10

When the prompt asks where the Instant Client typhoon:

instantclient,/opt/oracle/instantclient_12_1

third step:

Enable the extension of oci8 in

sudo echo "extension = oci8.so" >> /etc/php5/fpm/php.ini

sudo echo "extension = oci8.so" >> /etc/php5/cli/php.ini

fourth step:

Restart your PHP and Nginx/apache.

service php5-fpm restart

service nginx(ou apache) restart

Source: syahzul

Browser other questions tagged

You are not signed in. Login or sign up in order to post.