Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phpize command not found when run in terminal [duplicate]

Tags:

php

ubuntu

I was trying to install PECL extension, and required phpize. But when I ran phpize it displayed:

ps@ubuntu:~$ phpize
No command 'phpize' found, did you mean:
 Command 'phpize5' from package 'php5-dev' (main)
phpize: command not found

My current php version is : PHP Version 5.4.6-1ubuntu1.2 Should I install the php5-dev version? Will it have any conflicting issues? What are other alternative methods?

What should I do to resolve my issue? I'm running ubuntu 12.10

like image 726
xan Avatar asked May 15 '13 13:05

xan


People also ask

Where can I run Phpize?

The phpize command is meant to be run at the top level of an extension source directory. This source directory should contain a file named config.

What is Phpize command?

The phpize command is used to prepare the build environment for a PHP extension. In the following sample, the sources for an extension are in a directory named extname : $ cd extname $ phpize $ ./configure $ make # make install.


1 Answers

sudo apt-get install php5-dev

phpize is a tool used to prepare a php module for building, so you'll need the dev package. There shouldn't be any problems, assuming you're using a packaged version of PHP anyway.

(Update - for more recent versions of Ubuntu try sudo apt-get install php-dev)

like image 115
Paul Dixon Avatar answered Oct 14 '22 21:10

Paul Dixon