pecl: command not found

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,348
I am trying to install ImageMagick and Imagick from source on a CentOS 6.3 64bit server running newest DirectAdmin version.

I am following this guide: http://thegioinguonmo.com/os/linux/install-imagemagick-imagick-jp2-support-centos-60.html

However I get a problem when I come to step 6 in the guide wich tell me to run:

Code:
pecl install imagick

Running that command I get this errror:

Code:
[root@SERVER ImageMagick-6.7.8-6]# pecl install imagick
-bash: pecl: command not found

Does anybody know the solution to this? I have searched alot for answer without success.
 
Thanks. But I am sorry, that help page does not help me. Can you please be some more spesific in what I should do to solve the problem?
 
Well actually that binary position depend on php as cgi or cli.

For cgi the scsi path is correct, for cli should be:

/usr/local/bin/pecl

Regards
 
Thanks SeLLeRoNe. But I still. don't get what I should do instead of this command in step 6 in this guide:

http://thegioinguonmo.com/os/linux/install-imagemagick-imagick-jp2-support-centos-60.html

Code:
pecl install imagick

Wich give this error:

Code:
[root@SERVER ImageMagick-6.7.8-6]# pecl install imagick
-bash: pecl: command not found

I have done all other previous steps in the guide without problems. Only now is I am stuck on step 6 in the guide wich give that error.
 
Thank you! I changed the path because I use cgi/suphp. Now I get another error:

Code:
[root@server /]# /usr/local/php5/bin/pecl install imagick
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading imagick-3.0.1.tgz ...
Starting to download imagick-3.0.1.tgz (93,920 bytes)
.....................done: 93,920 bytes
13 source files, building
WARNING: php_bin /usr/local/php5/bin/php appears to have a suffix 5/bin/php, but config variable php_suffix does not match
running: phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
shtool at '/tmp/pear/temp/imagick/build/shtool' does not exist or is not executable.
Make sure that the file exists and is executable and then rerun this script.

ERROR: `phpize' failed

When I check, only this empty folder exist:

/tmp/pear/temp

There is no other folders inside /tmp/pear/temp
 
Last edited:
Check if /tmp has been mounted with noexec,nosuid options in /etc/fstab

If yes, you need to remporany remove those, remount the /tmp partition and retry.

Regards
 
Yes, I have mounted /tmp with noexec,nosuid, however I would not like to remove and remount. Hopefully I will find another way so that I don't have to remount ...
 
It take like 2mins to install and than you will be able to remount as it was, i dont see such a big risk once you know what you're doing.

Regards
 
Thanks. But I am a beginner. I only have the knowledge to mount /tmp with noexec,nosuid, I have never attempted to remount - so that would be another thing I would need to learn. Therfor I hope to find another solution.
 
Is not hard.

remove the noexec,nosuid related to /tmp in /etc/fstab save and run

mount -o remount /tmp

install apc, and, after that edit again /etc/fstab, re-add noexec,nosuid on /tmp related line and again, save and run

mount -o remount /tmp

Regards
 
Thank you! Before I try your solution. Do you think I can do it by hand instead? I found this: http://www.webhostingtalk.com/showpost.php?p=4215404&postcount=10 and maybe I can change it to my need? Maybe I can do this?:

Code:
cd /root
wget http://pecl.php.net/get/imagick-3.0.1.tgz
tar zxf imagick-3.0.1.tgz
cd /imagick-3.0.1.tgz
phpize
./configure
make
make install

I have not attempted it yet ...

(Edit: You wrote "apc" in your reply, I guess you meaned to write "imagick"?)
 
yes, i meant imagick :) im installing apc on some server right now so i get confused :)

I dont know that solution would work, i should be wrong but i think it will use /tmp on manual build too.

Well, you can test, if got error nothing different from previous ;)

Regards
 
If you are new at Linux/Unix you should know that entering just the command name depends on if it is in your environment variable $PATH. That is the search path for binary files. If it is not in your search path then you must enter the full path to the program. You could also edit your path variable to append searchable directories too.

You can do the following to see what directories your path searches for binary files:
Code:
echo $PATH

You could also change it so pecl could be a command you could search by doing this. Considering you are using the bash shell:

Code:
echo "export PATH=\$PATH:/usr/local/php5/bin" >> /root/.bashrc
export PATH=$PATH:/usr/local/php5/bin

Now you can see that pecl is searchable:

Code:
which pecl

More information here:
http://www.linfo.org/path_env_var.html
 
Last edited:
Thank you both, SeLLeRoNe and scsi. I am trying to learn this on a server wich I have none clients. On production server I have paid tech people to install this from source. However I like to learn it myself, so that if I manage to learn to install ImageMagick and Imagick from source, I can use that knowledge to maybe upgrade ImageMagick and Imagick on from source on my production server, because I don't like to use external tech people more then I absolutely need to. However, I am about to give up. I tried to compile by hand, but get problem:

Code:
[root@server ~]# cd /root
[root@server ~]# wget http://pecl.php.net/get/imagick-3.0.1.tgz
--2012-07-24 17:30:19--  http://pecl.php.net/get/imagick-3.0.1.tgz
Resolving pecl.php.net... 76.75.200.106
Connecting to pecl.php.net|76.75.200.106|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 93920 (92K) [application/octet-stream]
Saving to: âimagick-3.0.1.tgzâ

100%[===================================================================================================================================================================================================>] 93,920       223K/s   in 0.4s

2012-07-24 17:30:20 (223 KB/s) - âimagick-3.0.1.tgzâ

[root@server ~]# tar zxf imagick-3.0.1.tgz
[root@server ~]# cd imagick-3.0.1
[root@server imagick-3.0.1]# phpize
-bash: phpize: command not found
[root@server imagick-3.0.1]#

I don't like to use external tech people, because I feel often that it is more work because they often cause trouble because they make mistakes in server ...
 
Last edited:
...and yum install php-devel give this error:

Code:
[root@server imagick-3.0.1]# yum install php-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.sov.uk.goscomb.net
 * extras: mirror.sov.uk.goscomb.net
 * updates: mirror.sov.uk.goscomb.net
Setting up Install Process
No package php-devel available.
Error: Nothing to do
 
Last edited:
Well, it depend on tech people you ask, usually has a good practice to have a test server where do installation before production, at least, i use to do that :)

regarding your error, use:

whereis phpize

once foudn the path use this:

export PATH=$PATH:/usr/local/php5/bin

This should already be the correct path, if not, correct it before run it on server ;)

Once done, your phpize command should work fine, or, just use the full path of the command

Regards
 
You cant install php-devel from yum repository cause will conflict with directadmin installation, that's why it say is not avaible, has been insert in a exclude list for security purpose.

You should already have phpize installed, just need to find it ;)

Regards
 
Back
Top