jw
当前位置:主页 > linux >

Qt Ubuntu 12.10 error ptrace: Operation not permitted

发布时间:2013-07-04 | 佚名:www.07net01.com

While trying to debug for the first time I got this error:

ptrace: Operation not permitted.

Could not attach to the process. Make sure no other debugger traces this process.
Check the settings of
/proc/sys/kernel/yama/ptrace_scope
For more details, see /etc/sysctl.d/10-ptrace.conf


Solution:

On Ubuntu versions after 10.10 you'll run into this in more related applications, such as QtCreator. It is a security feature of Ubuntu that prevent the debugger to attach to processes not owned by him.

This is filed as a bug #3509 against QtCreator. To work around this issue, do this:

  • temporary solution (won't survive a reboot):

     echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
    
  • In a file /etc/sysctl.d/10-ptrace.conf (should already exist), change the value ofkernel.yama.ptrace_scope to 0 and then reload the configuration: sudo sysctl -p.

I'm explicitly posting the temporary solution, as you probably don't want to keep this feature disabled>

Ref: http://askubuntu.com/questions/244336/receiving-error-while-trying-to-debug-in-qtproject

编译:Qt Ubuntu 12.10 error ptrace: Operation not permitted

地址:http://www.07net01.com/linux/Qt_Ubuntu_12_10_error_ptrace__Operation_not_permitted_496977_1372910161.html

  • 更多
    上一篇:jquery javascript刷新iframe
    下一篇:没有了
    相关内容
    jw
    关于我们 | 联系我们 | 版权声明 | 意见反馈 | 网站地图 | 在线帮助 | | HowToBeautiful | HowSmokeyEye
    本站为您提供优质的Cisco网络技术相关文档与资讯,如果您有好的建议或意见,请发邮件告知我们。Email:bbc12000@163.com
    www.07net01.com 版权所有 Copyright 2000-2011 All rights reserved. 鲁ICP备11010007号-1