歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> 關於Linux

CentOs6.3 64位安裝libreoffice4.1.1

CentOs6.3 64位安裝libreoffice4.1.1   由於服務器的問題將原有的Ubuntu 32位系統換成CentOs6.3 64位的,在裝libreoffice是遇到了一些問題。 首先,安裝的libreoffice的版本是LibreOffice_4.1.2.3_Linux_x86_rpm(具體安裝的步驟在此省略,因為安裝後有問題),安裝後系統的默認目錄是/usr/lib64/libreoffice(ubuntu 32位中是在/usr/lib/libreoffice).項目中通過命令調用libreoffice轉換文檔(doc,docx,pdf,txt,excel....)生產pdf文檔,然後再將pdf轉換成swf文件,使其能夠在網頁上浏覽(doc,docx,pdf,txt,excel....--->pdf-->swf) 後台調用libreoffice時,拋出的異常是: Exception in thread "main" org.artofsolving.jodconverter.office.OfficeException: failed to start and connect at org.artofsolving.jodconverter.office.ManagedOfficeProcess.stopAndWait(ManagedOfficeProcess.java:77) at org.artofsolving.jodconverter.office.PooledOfficeManager.stop(PooledOfficeManager.java:108) at org.artofsolving.jodconverter.office.ProcessPoolOfficeManager.stop(ProcessPoolOfficeManager.java:91) at com.lexmark.pws.aps.pe.handler.impl.OfficeConnectorUtil.closeConnection(OfficeConnectorUtil.java:86) at com.lexmark.pws.aps.pe.ThumbnailEngine.main(ThumbnailEngine.java:65) Caused by: java.util.concurrent.ExecutionException: org.artofsolving.jodconverter.office.OfficeException: could not establish connection           at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)           at java.util.concurrent.FutureTask.get(FutureTask.java:111)           at org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:62)           ... 79 more  Caused by: org.artofsolving.jodconverter.office.OfficeException: could not establish connection           at org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:142) 但是在網上查找了很多資料,重新安裝、卸載、安裝相關package......     但是錯誤仍然依舊,沒有明確的解決方案。也有一些資料說是權限問題,改過就好了,但試過後沒有效果。於是就想著換個版本,然後奇跡就出現了。 Step 1: 下載LibreOffice 4.1.1 For RHEL/CentOS/Fedora 32-Bit # cd /tmp # wget http://download.documentfoundation.org/libreoffice/stable/4.1.1/rpm/x86/LibreOffice_4.1.1_Linux_x86_rpm.tar.gz For RHEL/CentOS/Fedora 64-Bit # cd /tmp # wget http://download.documentfoundation.org/libreoffice/stable/4.1.1/rpm/x86_64/LibreOffice_4.1.1_Linux_x86-64_rpm.tar.gz   Step 2: 刪除已安裝的libreoffice or openoffice # yum remove openoffice.org* libreoffice.org*   Step 3: 解壓LibreOffice 4.1.1 安裝包 ## For 32-Bit OS ## # tar -xvf LibreOffice_4.1.1_Linux_x86_rpm.tar.gz   ## For 64-Bit OS ## # tar -xvf LibreOffice_4.1.1_Linux_x86-64_rpm.tar.gz     Step 4: 安裝 LibreOffice 4.1.1 Package ## For 32 Bit OS ## # cd /tmp/LibreOffice_4.1.1_Linux_x86_rpm/RPMS/ # yum localinstall *.rpm # yum localinstall desktop-integration/libreoffice4.0-freedesktop-menus-4.1.1*.noarch.rpm   ## For 64 Bit OS ## # cd /tmp/LibreOffice_4.1.1_Linux_x86-64_rpm/RPMS/ # yum localinstall *.rpm # yum localinstall desktop-integration/libreoffice4.0-freedesktop-menus-4.1.1*.noarch.rpm PS: libreoffice4.0-freedesktop-menus-4.1.1*.noarch.rpm的路徑問題:有的位於RPMS/desktop-integration目錄下,有的位於RPMS下.不過,無論在那個目錄下,直接安裝就可以了.   Step 5: 在terminal中啟動 LibreOffice 4.1.1  # libreoffice4.1 綜上所述,解決這個問題的方法就是換了個版本,具體是什麼問題引起的,沒有找到. 如果有找到的朋友,可以分享一下解決方法.
Copyright © Linux教程網 All Rights Reserved