我試圖在我的虛擬專用服務器上安裝wkhtmltopdf。這是一個將HTML轉換爲PDF的工具。我正在嘗試在我的VPS上安裝wkhtmltopdf,但在執行時收到錯誤消息
我做了以下內容:
- 啓動SSH終端登錄。
- 坎德拉/無功/網絡/虛擬主機/ {域} /子域/級/的httpdocs/LIB/wkhtmltopdf
- wget的http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.10.0_rc2-static-i386.tar.bz2
- 焦油-ixvf wkhtmltopdf-0.10.0_rc2靜電-i386.tar.bz2
- ./wkhtmltopdf-i386 http://www.example.com/檢驗.pdf
這是我得到我的錯誤:
./wkhtmltopdf-i386: error while loading shared libraries: libXrender.so.1: cannot open shared object file: No such file or directory
好看着這個我想日必須安裝libXrender。所以我試圖找到這樣做的方式,但我並不是真正的Linux專家。我所做的發現是這樣的:
Before you install you will need to have X11, gcc and openssl installed. On Debian/Ubuntu this can be done as follows:
sudo aptitude install openssl build-essential xorg libssl-dev libxrender-dev
然後我得到這個:
sudo: aptitude: command not found
我覺得VPS運行紅帽企業我不知道的版本。它也運行Plesk 10.3。在我的plesk面板中,它說vps運行centOS,但是當我在SSH中輸入幫助信息時,它說redhat
感謝這對我工作,搜索VPS後,我發現它使用centOS.I也需要libXext。所以我搜索了正確的庫,並使用命令rpm -Uvh [rpm-file-downloaded-for-libXrender]安裝了它們,現在它們的工作方式類似於它。 – redn0x
我剛剛遇到這個問題,我收到以下錯誤「加載共享庫時出錯:libXrender.so.1:無法打開共享對象文件:沒有這樣的文件或目錄」。任何人都可以提供我任何想法?謝謝 – Dan