As noted by Marc B, you must have a package on your system containing the files necessary to create PHP extensions (usually php-devel).
On my Centos system, you should enter this command as root in the terminal:
yum install php-devel
This should work on Red Hat and Fedora, by the way.
On Debian or Ubuntu, the command is slightly different:
sudo apt-get install php5-dev
If you want to start the terminal, the required steps depend on your desktop environment. Ubuntu users usually get Unity, so:
Dash -> More Apps -> Accessories -> Terminal
In Gnome3:
Applications menu -> Accessories -> Terminal
The key combination in both environments is the same: Ctrl + Alt + T.
For other DEs, take a look at this document: https://help.ubuntu.com/community/UsingTheTerminal
source share