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
to0
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 on a regular machine for security reasons.
Ref: http://askubuntu.com/questions/244336/receiving-error-while-trying-to-debug-in-qtproject
相关推荐
Ubuntu12.10 一些日常使用操作说明,适合新手查看。
根据Ubuntu 12.10 发布进程,Ubuntu 12.10 Beta 1 已经发布,主要更新特性有Unity、主题、Firefox、LibreOffice、Ubuntu One等。 Ubuntu 12.10 正式版特性: 采用了新的 Linux 3.5 内核 一些I/O和安全方面的...
根据Ubuntu 12.10 发布进程,Ubuntu 12.10 Beta 1 已经发布,主要更新特性有Unity、主题、Firefox、LibreOffice、Ubuntu One等。 Ubuntu 12.10 正式版特性: 采用了新的 Linux 3.5 内核 一些I/O和安全方面的改进...
ubuntu12.10操作系统下载
讲解了ubuntux12.10xia像在windows下一样安装QQ
Ubuntu12.10菜鸟使用手册合集。作者用心记录了Ubuntu12.10的基本使用方法。
手把手教你怎么在VMware中安装Ubuntu操作系统。
linux Ubuntu12.10 系统下编译的 QT5.0.2 Mysql5.5.27驱动文件
之前Ubuntu12.10的触摸板总是不灵,在网上查到了重置触摸板的命令,然后自己用shell写的一个脚本.输入./repsmouse可以直接运行。 如果想不输入./运行的话,在文件目录里输入命令: sudo cp repsmouse /bin/ 就可以了...
Ubuntu 12.10 菜鸟使用手册合集下载.pdf
Ubuntu12.10菜鸟使用手册(三)
Ubuntu12.10 菜鸟使用手册(一) 最新的ubuntu 大家尽情玩吧
Ubuntu12.10 菜鸟使用手册(二) 菜鸟专用
ubuntu12.10菜鸟使用手册(一)
ubuntu12.10菜鸟使用手册(二)
VMware9安装Ubuntu 12.10图文详细教程
Ubuntu12.10下安装SimpleScalar.pdf
ubuntu 12.10的MAC美化包,个人经典保藏
Ubuntu12.10菜鸟使用手册(四)
U盘安装ubuntu12.10全过程详细图解.pdf