在Ubuntu 22.04 桌面版系统中,使用 unoconv 把 word文件转换成pdf文件,出现下面报错:
$ /usr/bin/unoconv --help
unoconv: Cannot find a suitable pyuno library and python binary combination in /usr/lib/libreoffice
ERROR: No module named 'uno'
unoconv: Cannot find a suitable pyuno library and python binary combination in /usr/lib/libreoffice
ERROR: No module named 'uno'
unoconv: Cannot find a suitable office installation on your system.
ERROR: Please locate your office installation and send your feedback to:
http://github.com/dagwieers/unoconv/issues
网上找了一圈都没有解决,然后就自己尝试看看,结果搞定了。方法如下:
在libreoffice的目录中,创建红色方框的软连接:
但是这需要root权限或者sudo权限。