1

I am trying to install PHP drivers for MSSQL Server because I get an error sqlsrv_connect is undefined

I ran the command sudo pecl install sqlsrv

and I get this error output:

Makefile:181: recipe for target 'conn.lo' failed
make: *** [conn.lo] Error 1
ERROR: `make' failed

I can't seem to find what is going on wrong here.

halfer
  • 19,824
  • 17
  • 99
  • 186
Ali Elkhateeb
  • 3,413
  • 4
  • 21
  • 39

1 Answers1

0

Ok I figured out the solution to this: The problem was I didn't have php-pear php7.2-dev so running the following command:

sudo apt-get install php-pear php7.2-dev

Then proceed with: sudo pecl install sqlsrv

That worked!

Ali Elkhateeb
  • 3,413
  • 4
  • 21
  • 39