-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swoole-cli在linux下无法使用-a进入shell交互,提示:Interactive shell (-a) requires the readline extension. #790
Comments
正在研究中 |
经过测试验证发现 ,从 5.1.2 版本开始,出现了这种情况。 |
应该是升级 PHP 源码 把修改覆盖了 update php to 8.1.27 产生的原因: sync-source-code.php 代码有缺陷,同步readline 扩展未做处理 修复启用 readline 方法: 修复方法: |
fix: #799 |
印象中以前版本的确不存在该问题,就是从5.1.x版本出现了该问题 |
通用shell 脚本解决 FOUND_DL_READLINE=$(grep -c '#ifdef COMPILE_DL_READLINE' ext/readline/readline_cli.c)
if test $[FOUND_DL_READLINE] -gt 0 ; then
# 获得待删除 区间
START_LINE_NUM=$(sed -n "/#ifdef COMPILE_DL_READLINE/=" ext/readline/readline_cli.c)
START_LINE_NUM=$(($START_LINE_NUM - 1))
END_LINE_NUM=$(sed -n "/PHP_MINIT_FUNCTION(cli_readline)/=" ext/readline/readline_cli.c)
END_LINE_NUM=$(($END_LINE_NUM - 5))
sed -i.backup "${START_LINE_NUM},${END_LINE_NUM}d" ext/readline/readline_cli.c
REPLACE_LINE_NUM=$(sed -n "/#define GET_SHELL_CB(cb) (cb) = php_cli_get_shell_callbacks()/=" ext/readline/readline_cli.c)
REPLACE_LINE_NUM=$(($REPLACE_LINE_NUM + 1))
sed -i.backup "${REPLACE_LINE_NUM} s/.*/ /" ext/readline/readline_cli.c
fi
|
嗯,我这边已经试过编译成功了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
swoole-cli在linux下无法使用-a进入shell交互,提示:Interactive shell (-a) requires the readline extension.
猜测应该是readline扩展加载比较滞后导致的
The text was updated successfully, but these errors were encountered: