pecl install apc isn't working. shtool does not exist
Asked Answered
A

2

22

I am an absolute newbie…didn't learn about SSh till an hour ago and got my first VPS 2 hours ago. Still learning!

So I'm installing MediaWiki and need to add APC extension. But having a lil trouble. Any ideas/tips?

[root@www ~]# pecl install apc`
downloading APC-3.1.13.tgz ...
Starting to download APC-3.1.13.tgz (171,591 bytes)
.....................................done: 171,591 bytes
55 source files, building
running: phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
shtool at '/var/tmp/APC/build/shtool' does not exist or is not executable.
Make sure that the file exists and is executable and then rerun this script.`
Albinus answered 28/3, 2013 at 21:17 Comment(1)
can you please post the output of the mount command? Maybe your /var partition have nosuid,noexec setGrillo
H
44

Remove noexec flag from /var/tmp directory use the following command

mount -o remount,exec /var/tmp/

You can use the same command to add the noexec flag back

mount -o remount,noexec /var/tmp/
Houseraising answered 26/6, 2013 at 23:46 Comment(2)
Worked perfectly, but on Ubuntu I needed to run sudo mount -o remount,exec /tmp/ and then sudo mount -o remount,noexec /tmp/Gennagennaro
See apolinux' answer for a more appropriate workaround which will also work in environments that do not allow remounting /tmp, e.g. shared hostings or docker container when set to tempfs.Cachou
P
20

Try this, copied from http://blog.litespeedtech.com/2013/04/05/trouble-shooting-pecl-install-doesnt-work/

A more appropriate workaround is to point PECL’s temp_dir to a partition or path that allows execution:

mkdir /root/tmp
pecl config-set temp_dir /root/tmp

or

pear config-set temp_dir /root/tmp

(There is a known bug where pecl config-set does not work but pear config-set does. If this is the case for you, simply use the PEAR config command. PECL will use PEAR when doing the install.)

This workaround preserves any security benefit from having /tmp set as noexec, but also allows PECL installs.

Phonon answered 30/11, 2016 at 14:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.