ubuntu下Qtcreator編寫c/c++程序無法調試的解決辦法

ubuntu12.10(64bit)下使用Qt Creator 5.1.1編寫c/c++程序,在控制檯程序調試的時候出現如下的問題:

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


解決辦法是在終端輸入:sudo gedit /etc/sysctl.d/10-ptrace.conf 

把其中的kernel.yama.ptrace_scope = 1 改爲 kernel.yama.ptrace_scope = 0

然後重啓。



發佈了16 篇原創文章 · 獲贊 0 · 訪問量 2萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章