我正在尝试在 Fedora 19 上从源代码安装 pyside。运行sudo python setup.py bdist_egg --version=1.2.0 --qmake=/usr/lib64
给出:
HEAD is now at 92062bc... Version bump to 0.2.14
Checking out submodule pyside-examples to branch master
Running process: git checkout master
Already on 'master'
Removing /home/andreas/pyside-setup/pyside_package
running bdist_egg
running build
Python architecture is 64bit
error: Permission denied
并且没有 sudo:
Traceback (most recent call last):
File "setup.py", line 228, in <module>
rmtree(d)
File "/home/andreas/pyside-setup/utils.py", line 280, in rmtree
shutil.rmtree(dirname, ignore_errors=False, onerror=handleRemoveReadonly)
File "/usr/lib64/python2.7/shutil.py", line 247, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "/usr/lib64/python2.7/shutil.py", line 256, in rmtree
onerror(os.rmdir, path, sys.exc_info())
File "/home/andreas/pyside-setup/utils.py", line 276, in handleRemoveReadonly
os.chmod(path, stat.S_IRWXU| stat.S_IRWXG| stat.S_IRWXO) # 0777
OSError: [Errno 1] Operation not permitted: '/home/andreas/pyside-setup/pyside_package/PySide'
答案1
由于/home/andreas/pyside-setup/pyside_package/PySide
没有可执行位,因此您应该对其进行设置。这允许执行脚本:
chmod u+x /home/andreas/pyside-setup/pyside_package/PySide
应允许执行。任何“可执行文件”都需要这个位,否则 Linux 将阻止您执行。这是Linux的安全措施之一。