
我正在嘗試安裝ogre-meshviewer
,但出現以下錯誤:
(base) comp@comp:~$ sudo snap install ogre-meshviewer
snap "ogre-meshviewer" is already installed, see 'snap help
refresh'
(base) comp@comp:~$
(base) comp@comp:~$ sudo ogre-meshviewer
mkdir: cannot create directory '/run/user/0': Permission denied
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
usage: ogre_mesh_viewer.py [-h] [-c RESCFG] infile
ogre_mesh_viewer.py: error: the following arguments are required: infile
我該如何解決這個問題?
答案1
正如命令的輸出sudo snap install ogre-meshviewer
通知您,ogre-meshviewer
已成功安裝。
您收到的錯誤是因為您嘗試ogre-meshviewer
在沒有所需位置參數(infile
輸入檔案)的情況下執行:
usage: ogre_mesh_viewer.py [-h] [-c RESCFG] infile ogre_mesh_viewer.py: error: the following arguments are required: infile
因此,如果您將其運行為:
ogre-meshviewer /path/to/mesh_file
它應該可以正常工作。
/path/to/mesh_file
正如預期的那樣,是文件的路徑.mesh
(或任何其他支援的格式,即.obj
,.ply
或.fbx
) 已存在於您的系統中。路徑可以是絕對或相對。