我在我的www.example.com中使用grpcapp.py,我打算在SGX中使用Gramine运行app.py,当我运行命令gramine-sgx ./python app.py"
时,我得到错误:
Traceback (most recent call last):
File "app.py", line 2, in <module>
import grpc
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 844, in exec_module
File "<frozen importlib._bootstrap_external>", line 980, in get_code
File "<frozen importlib._bootstrap_external>", line 1037, in get_data
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.8/dist-packages/grpc/__init__.py'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 72, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 32, in <module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 27, in <module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 36, in <module>
apt_pkg.init_system()
apt_pkg.Error: E:Error reading the CPU table
Original exception was:
Traceback (most recent call last):
File "app.py", line 2, in <module>
import grpc
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 844, in exec_module
File "<frozen importlib._bootstrap_external>", line 980, in get_code
File "<frozen importlib._bootstrap_external>", line 1037, in get_data
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.8/dist-packages/grpc/__init__.py'
我检查了www.example.com的权限init.py,甚至尝试使用sudo运行代码,但出现了相同的错误
-rw-r--r-- 1 root staff 82351 Dec 15 13:37 __init__.py
1条答案
按热度按时间3j86kqsm1#
将/usr/local/lib/python3.8/dist-packages/grpc/添加到清单中的受信任文件解决了该问题。