31、RK3399 编译android-fstack-protector-strong not supported by compiler

    科技2025-03-15  20

    Makefile:717: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler File "./scripts/gcc-wrapper.py", line 67 print "error, forbidden warning:", m.group(2) ^ SyntaxError: invalid syntax scripts/kconfig/conf --silentoldconfig Kconfig Makefile:717: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler File "./scripts/gcc-wrapper.py", line 67 print "error, forbidden warning:", m.group(2)

    解决方案:是因为Python2.7与Python3.6的环境导致的

    系统支持为:Ubuntu18.04 系统默认安装:Python2.7 自己安装:Python3.6

    由于编写需要,有些程序只能在Python3下进行执行,当然可以选择在命令行进行指定环境的运行,但总归是有点不方便,便将系统的默认环境进行修改 1 查看系统的Python环境

    python --version

    2 查看系统Python的可用环境列表

    update-alternatives --list python

    3、此处如果显示update-alternatives: error: no alternatives for python 则输入(这里的版本号根据自己安装的设定)

    update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 update-alternatives --install /usr/bin/python python /usr/bin/python3.6 1

    3 设定Python环境

    update-alternatives --config python

    至此,系统的Python环境设置成功。方法不止一种,只要能够解决问题就好。

    Processed: 0.013, SQL: 8