You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows11下Ubuntu WSL执行程序时遭遇libc.so.6权限拒绝错误求助

Windows11下Ubuntu WSL执行程序时遭遇libc.so.6权限拒绝错误求助

Hey there, let's work through this permission denied error with libc.so.6 when running your stereo program in Ubuntu WSL on Windows 11. I've dealt with similar WSL permission quirks before, so here are some practical steps to troubleshoot and fix it:

  • Check the permissions of libc.so.6 and its target file
    First, let's verify the current permissions of the libc symlink and the actual library file it points to. Run this command:
    ls -l /lib/x86_64-linux-gnu/libc.so.6
    You should see output like lrwxrwxrwx 1 root root 12 Aug 1 10:00 /lib/x86_64-linux-gnu/libc.so.6 -> libc-2.31.so (the version number might vary). The symlink itself usually has wide-open permissions, but the target libc-2.x.so file needs to be readable and executable by all users. If its permissions are off, fix them with:
    sudo chmod 755 /lib/x86_64-linux-gnu/libc-2.31.so (replace 2.31 with your actual version from the symlink output)

  • Verify your stereo program has execute permissions
    The error mentions the path /home/prankur_sharma/prankur_23/dem_gen/sw/StereoPipeline-2.7.0-2020-07-29-x86_64-Linux/bin/stereo—make sure this binary has the right to run. Check with:
    ls -l /home/prankur_sharma/prankur_23/dem_gen/sw/StereoPipeline-2.7.0-2020-07-29-x86_64-Linux/bin/stereo
    If you don't see an x in the permission string (like -rw-r--r--), add execute permissions with:
    chmod +x /home/prankur_sharma/prankur_23/dem_gen/sw/StereoPipeline-2.7.0-2020-07-29-x86_64-Linux/bin/stereo

  • Avoid running programs from Windows-mounted drives
    If your StereoPipeline folder is stored on a Windows drive (like /mnt/c or /mnt/d), WSL's permission mapping for Windows files can cause unexpected issues. Try moving the entire StereoPipeline-2.7.0-2020-07-29-x86_64-Linux directory to your WSL home folder (e.g., /home/prankur_sharma/) and run the program from there instead.

  • Reinstall the libc6 package
    If the libc library file itself is corrupted or has incorrect permissions due to a bad update, reinstalling it can reset things to default:
    sudo apt-get update && sudo apt-get install --reinstall libc6

  • Check for AppArmor restrictions
    While WSL doesn't enable AppArmor by default in most cases, it's worth ruling out. Temporarily stop the AppArmor service and test your program:
    sudo systemctl stop apparmor
    If this fixes the issue, you can disable it permanently with sudo systemctl disable apparmor (though only do this if you're sure you don't need it).

Try these steps one at a time, and let me know if any of them resolves your problem. If not, we can also check if switching between WSL1 and WSL2 makes a difference—sometimes the two versions handle permissions differently.

备注:内容来源于stack exchange,提问作者Prankur Sharma

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.22 07:38:12