Open site shell works on PHP 7.4 but not on PHP 8.1 (Manjaro)

Bug Summary

OS: Linux Manjaro

When using PHP 8.1, when I click “Open site shell”, it opens the terminal as expected, but throws an error at shell startup. If I change to PHP 7.4, it works.

Setting Local environment variables...
----
WP-CLI:   WP-CLI 2.9.0
sh: symbol lookup error: sh: undefined symbol: rl_trim_arg_from_keyseq
Composer: 2.6.2 2023-09-03
PHP:      8.1.23
MySQL:    mysql  Ver 8.0.16 for Linux on x86_64 (MySQL Community Server - GPL)
----
Launching shell: /usr/bin/zsh ...
bash: symbol lookup error: bash: undefined symbol: rl_trim_arg_from_keyseq

Essentially, Bash is broken on that session because of the LD_LIBRARY_PATH override:

➜  public ldd /bin/bash                                                                                                                                                                                                    
/bin/bash: symbol lookup error: /bin/bash: undefined symbol: rl_trim_arg_from_keyseq

➜  public LD_LIBRARY_PATH='' ldd /usr/bin/bash                                                                                                                                                                             
        linux-vdso.so.1 (0x00007ffe6d1f8000)
        libreadline.so.8 => /usr/lib/libreadline.so.8 (0x00007fdb357ca000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007fdb355de000)
        libncursesw.so.6 => /usr/lib/libncursesw.so.6 (0x00007fdb3556f000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fdb35977000)

By searching for “LD_LIBRARY_PATH” on Local directory, I can see that it overrides it at siteShellStartupPOSIX.

If I change the site PHP version from 8.1 to 7.4, it works.

I also have same problem.
Local Version 9.0.5+6706

Operating System: Kubuntu 24.04
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.13
Kernel Version: 6.8.0-39-generic (64-bit)
Graphics Platform: X11
Processors: 2 × Intel® Core™ i7-8700K CPU @ 3.70GHz
Memory: 15.6 GiB of RAM
Graphics Processor: llvmpipe
Manufacturer: VMware, Inc.
Product Name: VMware Virtual Platform
System Version: None

Thank you @genepine and @Lucas

Our team has a bug filed to look into this further. We don’t have any ETA to provide on when this will be resolved so for now if you’re able to workaround with an older PHP version that will be the way to go.

1 Like