![Python 실행 파일(pyinstaller를 사용하여 생성됨)에서 VBoxManage 명령을 실행할 수 없습니다.](https://linux55.com/image/173300/Python%20%EC%8B%A4%ED%96%89%20%ED%8C%8C%EC%9D%BC(pyinstaller%EB%A5%BC%20%EC%82%AC%EC%9A%A9%ED%95%98%EC%97%AC%20%EC%83%9D%EC%84%B1%EB%90%A8)%EC%97%90%EC%84%9C%20VBoxManage%20%EB%AA%85%EB%A0%B9%EC%9D%84%20%EC%8B%A4%ED%96%89%ED%95%A0%20%EC%88%98%20%EC%97%86%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
운영 체제: 우분투 16.04 LTS
install.py 파일을 실행 가능하게 만듭니다.
pyinstaller -w install.py --onefile
Install.py 스크립트:
import os
VM = os.system('VBoxManage startvm win10 --type headless')
if VM == 0:
print("win10 started...")
else:
print("win10 not started....")
질문:우분투 터미널에서 실행 하면 python3 install.py
잘 작동합니다. 그 후 위에서 언급한 명령을 사용하여 실행 파일을 생성하고 명령을 제공하여 터미널에서 실행 파일을 실행했습니다 chmod 777 install & ./install
. 다음과 같은 오류가 발생합니다.
실수:
VBoxManage: error: Failed to create the VirtualBox object!
VBoxManage: error: Code NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154) - Class not registered (extended info not available)
VBoxManage: error: Most likely, the VirtualBox COM server is not running or failed to start.
무엇이 잘못되었는지 모르겠습니다. Python 스크립트는 제대로 작동하지만 실행 파일을 만들 때마다 동일한 오류가 발생합니다.
미리 감사드립니다.