1.错误Yama security xxx
Error: gdb: Yama security extension is blocking runtime attaching, see /proc/sys/kernel/yama/ptrace_scope
解决办法:
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
2.错误ptrace: Operation not permitted
错误1解决了之后,运行gammary,又报错:
GDB Problem "ptrace: Operation not permitted."
解决方法:
sudo gedit /etc/sysctl.d/10-ptrace.conf
把其中的kernel.yama.ptrace_scope = 1 改为 kernel.yama.ptrace_scope = 0
然后重启电脑即可。