
我正在嘗試從原始程式碼建立 pgadmin 1.20。我已經安裝了1.20.0。
無論如何,我按照安裝文件中的腳本進行操作。這就是我被困的地方:
make
./pgadmin/ui/embed-xrc
Rebuilding xrcdialogs.cpp...
wxrc: error while loading shared libraries: libwx_baseu_xml-2.8.so.0: cannot open shared object file: No such file or directory
diff: ./pgadmin/ui/xrcDialogs.cpp.new: No such file or directory
mv: cannot stat ‘./pgadmin/ui/xrcDialogs.cpp.new’: No such file or directory
Makefile:1024: recipe for target 'xrc' failed make: *** [xrc] Error 1
我嘗試重新配置為 wxGTK-2.8.12 版本
./configure –prefix=/usr/local/WX --with-gtk --enable-gtk2 --enable-unicode.
我收到了同樣的訊息。我嘗試使用 pgadmin 1.20 刪除所有內容並從頭開始。我嘗試重新安裝 wxGTK 2.8.12。一切都是徒勞。
有什麼想法我該從哪裡開始尋找嗎?
答案1
如果尚未安裝,libxml2
請安裝。libxslt
您應該確保您的電腦中或某處libwx_baseu_xml
擁有庫檔案。/usr/local/lib
也要確保該位置libwx_baseu_xml
位於庫搜尋路徑中/etc/ld.so.conf
您只需執行以下命令即可更新庫:
sudo ldconfig
在大多數情況下,這應該可以解決問題。
答案2
除了榮恩的回答,您也可以使用LD_LIBRARY_PATH
環境變數暫時設定動態連結器的附加路徑,以搜尋非標準位置的共用程式庫:
LD_LIBRARY_PATH
A list of directories in which to search for ELF libraries at
execution-time. The items in the list are separated by either
colons or semicolons. Similar to the PATH environment vari‐
able. This variable is ignored in secure-execution mode.
(改編自ld.so(8)
聯機幫助頁)
因此,以下命令應該可以工作,而無需ldconfig
以超級用戶身份運行:
env LD_LIBRARY_PATH=/usr/local/WX/lib ./configure --prefix=/usr/local/WX --with-gtk --enable-gtk2 --enable-unicode