全新安装 Ubuntu 22.04.3 LTS、VS Code、python 3.10.12。以下 python 脚本:
tmpFilename = '.screenshot%s.png' % (datetime.datetime.now().strftime('%Y-%m%d_%H-%M-%S-%f'))
subprocess.call(['gnome-screenshot', '-f', tmpFilename])
当我调试这个脚本时,它给出了很多错误
Failed to load module: /home/miranda/snap/code/common/.cache/gio-modules libgiolibproxy.so
gnome-screenshot: symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE
/snap/core20/current/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /lib/x86_64-linux-gnu/libproxy.so.1)
Failed to load module: /home/miranda/snap/code/common/.cache/gio-modules/libgiolibproxy.so
gnome-screenshot: symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE
但是如果我从 bash 终端窗口运行没有 VS Code 调试器的 python 脚本,一切都正常。