how to install and run phpize

2019-01-07 04:54发布

I have been meaning to install ffmpeg as an extension to my php setup. So before I can install it, I need to phpize it. I installed php5-dev by sudo apt-get install php5-dev But now when I run phpize I get the following error :

phpize
Cannot find config.m4. 
Make sure that you run '/usr/bin/phpize' in the top level source directory of the module

The location of my php.ini is /usr/local/zend/etc/php.ini

From another online resource i tried this

sudo apt-get install autoconf automake libtool m4

But all of them are already installed.

Locate config.m4 didnt return anything.

Any pointers here how I can get phpize and thus, ffmpeg up and running ?

15条回答
叛逆
2楼-- · 2019-01-07 05:25

Step - 1: If you are unsure about the php version installed, then first run the following command in terminal

php -v

Output: the above command will output the php version installed on your machine, mine is 7.2

PHP 7.2.3-1ubuntu1 (cli) (built: Mar 14 2018 22:03:58) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.3-1ubuntu1, Copyright (c) 1999-2018, by Zend Technologies

Step 2: Then to install phpize run the following command, Since my php version is 7.2.3. i will replace it with 7.2, so the command will be,

sudo apt-get install php7.2-dev

Step 3: Done!

Alternate method(Optional): To automatically install the phpize version based on the php version installed on your machine run the following command.

sudo apt-get install php-dev

This command will automatically detect the appropriate version of php installed and will install the matching phpize for the same.

查看更多
霸刀☆藐视天下
3楼-- · 2019-01-07 05:26

For PHP7 Users

sudo apt-get install php7.0-dev
查看更多
一夜七次
4楼-- · 2019-01-07 05:28

Go to the downloaded folder and there you find config.m4. Open the terminal and run phpsize.

查看更多
The star\"
5楼-- · 2019-01-07 05:29

Ohk.. I got it running by typing /usr/bin/phpize instead of only phpize.

查看更多
对你真心纯属浪费
6楼-- · 2019-01-07 05:31

Under Redhat Enterprise / CentOS, use yum to install the php-devel module:

yum install php-devel

For PHP 7, you need:

yum install php70-php-devel
查看更多
兄弟一词,经得起流年.
7楼-- · 2019-01-07 05:31

For ubuntu with plesk installed run apt-get install plesk-php56-dev ,for other versions just change XX in phpXX (without dot)

https://nelsahost.com

查看更多
登录 后发表回答