服务器虚拟机exist,安装mysqli报错,shtool does not exist or is not executable.

Trouble Shooting: “PECL Install Doesn’t Work”

Some users prefer to mount their /tmp directory as noexec for security reasons, but we’ve seen that this can cause a problem for PECL installs. Pointing the PECL temp_dir to a new path gets around this problem.

Now, this isn’t strictly a LiteSpeed issue, but we thought some might find it useful to explore: Whether or not /tmp should be mounted as noexec is a matter of debate. A number of sources suggest that every server running Linux should mount /tmp as nonexecutable to prevent SUID attacks, but some scoff that this only provides false security. No matter what, any security feature is going to have some weaknesses, and it is understandable if a lot of users want to add the noexec option. Most of the time, having /tmp as noexec shouldn’t cause any problems, but recently a user reported this error while trying to do a PECL install for LSPHP (though this would be the same for PHP):

root@cptest [/usr/local/bin]# ./pecl install -n bbcode

downloading bbcode-1.0.2.tgz …

Starting to download bbcode-1.0.2.tgz (46,961 bytes)

………….done: 46,961 bytes

7 source files, building

running: phpize

Configuring for:

PHP Api Version:         20100412

Zend Module Api No:      20100525

Zend Extension Api No:   220100525

shtool at ‘/tmp/pear/bbcode/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

Now, the obvious “solution” to this problem is to make /tmp executable (the command mount -o remount,exec /tmp would work), but that disables any extra security we were hoping to get in the first place. 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.

We’d love to hear any comments, questions, or criticisms. Cheers!

http://blog.litespeedtech.com/2013/04/05/trouble-shooting-pecl-install-doesnt-work/

这篇文章是解决另外一个软件的类似问题的

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值