我在OSX上运行MATLAB 2013a,并尝试使用MATLAB脚本将.xlsx文件转换为.pdf . 在确定单独使用MATLAB无法实现这一点后,我下载了LibreOffice来帮助我 . 在Mac终端中运行以下代码非常有效:

/Applications/LibreOffice.app/Contents/MacOS/soffice --headless --convert-to pdf:writer_pdf_Export --outdir /Users/dwm8/Desktop/ /Users/dwm8/Desktop/box_copy.xlsx

此代码将文件 box_copy.xlsx 保存为桌面上的.pdf文件 . 但是,当我尝试使用 system() 在MATLAB中运行相同的代码时:

system('/Applications/LibreOffice.app/Contents/MacOS/soffice --headless --convert-to pdf:writer_pdf_Export --outdir /Users/dwm8/Desktop/ /Users/dwm8/Desktop/box_copy.xlsx')

.pdf没有保存,我收到错误:

dyld:未加载库:@ loader_path / libcurl.4.dylib引用自:/Applications/LibreOffice.app/Contents/Frameworks/libvcllo.dylib原因:不兼容的库版本:libvcllo.dylib需要8.0.0或更高版本,但是libcurl.4.dylib提供版本7.0.0 /Applications/LibreOffice.app/Contents/MacOS/soffice --headless --convert-to pdf:writer_pdf_Export --outdir / Users / dwm8 / Desktop / / Users / dwm8 / Desktop / box_copy.xlsx:跟踪/断点陷阱`

此外,弹出此错误窗口:

enter image description here

有没有人有这个错误的解决方案?