/usr/bin/install: 无法更改“/usr/local/python397/bin“ 的权限: 没有那个文件或目录

编译python3.9.7时报错:

hbj@hbj-virtual-machine:/usr/local/python397/Python-3.9.7$ sudo make -j8 && make altinstall
 CC='gcc -pthread' LDSHARED='gcc -pthread -shared    ' OPT='-DNDEBUG -g -fwrapv -O3 -Wall' 	_TCLTK_INCLUDES='' _TCLTK_LIBS='' 	./python -E ./setup.py  build
running build
running build_ext

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_uuid                                                          
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc                  atexit                pwd                
time                                                           

running build_scripts
copying and adjusting /usr/local/python397/Python-3.9.7/Tools/scripts/pydoc3 -> build/scripts-3.9
copying and adjusting /usr/local/python397/Python-3.9.7/Tools/scripts/idle3 -> build/scripts-3.9
copying and adjusting /usr/local/python397/Python-3.9.7/Tools/scripts/2to3 -> build/scripts-3.9
changing mode of build/scripts-3.9/pydoc3 from 644 to 755
changing mode of build/scripts-3.9/idle3 from 644 to 755
changing mode of build/scripts-3.9/2to3 from 644 to 755
renaming build/scripts-3.9/pydoc3 to build/scripts-3.9/pydoc3.9
renaming build/scripts-3.9/idle3 to build/scripts-3.9/idle3.9
renaming build/scripts-3.9/2to3 to build/scripts-3.9/2to3-3.9
Creating directory /usr/local/python397/bin
/usr/bin/install: 无法更改"/usr/local/python397/bin" 的权限: 没有那个文件或目录
Creating directory /usr/local/python397/lib
/usr/bin/install: 无法更改"/usr/local/python397/lib" 的权限: 没有那个文件或目录
Makefile:1313: recipe for target 'altbininstall' failed
make: *** [altbininstall] Error 1

解决方法:

单独执行sudo make altinstall

参考:https://blog.csdn.net/wanzheng_96/article/details/106883314

  • 4
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值