Home >Backend Development >PHP Problem >What to do if php-config cannot be found

What to do if php-config cannot be found

藏色散人
藏色散人Original
2021-11-16 09:48:523281browse

Solutions to the problem that php-config cannot be found: 1. Solve the problem through the "CentOS6 PHP extension install: Cannot find..." method; 2. Solve the problem through the "yum install php-devel." command .

What to do if php-config cannot be found

The operating environment of this article: centOS6.8 system, PHP7.1 version, DELL G3 computer

php-config cannot be found what to do?

php-config cannot be found in centos

Two solutions:

1.CentOS6 PHP extension install: Cannot find php-config. Please use --with-php-config=PATH

2.yum install php-devel.

php-config is a simple command line script Used to obtain information about the installed PHP configuration.

When compiling an extension, if multiple PHP versions are installed, you can use the --with-php-config option during configuration to specify which version to use for compilation. This option specifies the corresponding php-config. The path to the script.

The options that the php-config script can use on the command line can be displayed through the -h option:

Usage: /usr/local/bin/php-config [OPTION]
Options:
  --prefix            [...]
  --includes          [...]
  --ldflags           [...]
  --libs              [...]
  --extension-dir     [...]
  --include-dir       [...]
  --php-binary        [...]
  --php-sapis         [...]
  --configure-options [...]
  --version           [...]
  --vernum            [...]

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What to do if php-config cannot be found. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn