问题
在运行的 Thanos 的时候遇到了如下问题,为了解决这个问题,做了重装 gcc 等尝试,未成功。最后查询学习了一系列有关 Linux 权限的知识,解决了这个问题。
1 2
| cc1: error: /usr/local/include/x86_64-linux-gnu:
|
Linux 文件权限
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
| ls -l
drwxr-xr-x 2 root root 65536 Jun 30 18:48 bin drwxr-xr-x 2 root root 4096 Jun 23 17:52 config drwxr-xr-x 2 root root 4096 Apr 15 2020 games
sudo su chmod 777 include
chown root /var/run/httpd.pid
chown -R runoob:runoobgroup *
lsattr local --------------e----- local/src ----i---------e----- local/include
chattr -i local/include lsattr --------------e----- ./src --------------e----- ./include
|
参考
- i e 属性的解释: https://blog.systemctl.top/2017/2017-04-14_something-about-lsattr_-i_-e/
- Linux command reference: https://www.runoob.com/linux/linux-comm-lsattr.html
- 文件权限总结: https://www.cnblogs.com/chenqionghe/p/10407336.html