This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(9)
我遇到了同样的问题,看来我的分区被安装为 noexec
cat /etc/mtab
当我在 /etc/fstab 中配置选项时,我编写了 exec,user 但似乎“user”选项默认设置为“noexec”。 当我将这两个命令更改为 user,exec 时,一切都恢复正常!
希望能帮助到你。
I had the same problem and it appeared that my partition was mounted as noexec
cat /etc/mtab
When I configured options in /etc/fstab I wrote exec,user but it appears that "user" option by default sets up "noexec". When I changed the order of these two to user,exec everything went back to normal!
Hope it helps.
你如何编译它? 你能发布makefile吗? 如果你运行
一些改变?
How are you compiling it? Can you post the makefile? If you run
something changes?
通过运行“mount”检查挂载点以查看其是否挂载为 noexec
Check the mountpoint to see if it's mounted as noexec by running "mount"
我在 Ubuntu 上使用 CodeBlocks,并且多次遇到过这个问题。
KermiDT所说的正是解决方案(如果我有足够的代表点,我会投票赞成)
“user”选项默认设置“noexec”。
所以在 /etc/fstab 中只需在 user 之后添加 ,exec 即可。
即我的看起来像这样:
/dev/sda6 /media/DATA vfat uid=kenny,gid=kenny,users,user,exec 0 0
虽然间距有点小……但你明白了。
I use CodeBlocks on Ubuntu and have had this exact problem MANY times.
what KermiDT said is exactly the solution (if i had enough rep points, i would have voted it up)
The "user" option by default sets up "noexec".
so in /etc/fstab just add ,exec after user.
i.e. mine looks like this:
/dev/sda6 /media/DATA vfat uid=kenny,gid=kenny,users,user,exec 0 0
Though, the spacingis a bit off... but you get the idea.
除了上面提到的 chmod +x 文件之外,另一个问题可能是缺少库。 要检查所需的库,请使用 ldd:
如果其中一行显示缺少库,您就会知道在运行程序之前需要安装什么。
另一种可能性是您的程序是脚本(shell、perl、python 或其他基于文本的程序)。 第一行如下所示:
如果找不到该文件,您将收到权限被拒绝的错误。
Apart from the above mentioned chmod +x file, another problem might be a missing library. To check the required libraries, use ldd:
If one of these lines shows a missing library, you'll know what needs to be installed before you can run your program.
Another possibility is if your program is a script (shell, perl, python or other text-based program). The first line looks like:
If that file cannot be found, you'll get a permission denied error.
有几个问题:
Couple of questions:
尝试在 64 位系统上执行 32 位应用程序时也会遇到此问题。 执行:
并检查两者都是“i386”或“amd64”。
如果它们不相同,请查看 这篇文章:
You also get this problem when trying to execute 32-bit apps on a 64-bit system. Execute:
and check that both are either "i386" or "amd64".
If they are not the same, have a look at this article:
尝试使用
strace
执行命令来跟踪成功的系统调用它的发出和停止的位置。这就是您启动它的方式,
您是否收到“权限被拒绝”错误或类似“执行格式错误”之类的错误? 在文件上使用
chmod +rx
,您不应点击“权限被拒绝”。Try executing the command with
strace
to trace the successful system calls it makes and where it stops.This is how you might launch it,
Do you get a "permission denied" error or something like "exec format error"? With
chmod +rx
on the file you should not hit "permission denied".您还应该确保您的用户名位于视频组中。 检查 /etc/group 并确保您的用户名出现在“视频”行上。
You should also make sure that your username is in the video group. Check the /etc/group and make sure that your username appears on the "video" line.