No package 'glib-2.0' found

我是在安裝libvmi的時候遇到了這個問題,之前已經裝好了glib-2.44.1,但在libvmi目錄下執行./configure的時候爆出了這個錯誤,

雖然一度通過

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH

把glib-2.0.pc這個文件的路徑/usr/local/lib/pkgconfig加到PKG_CONFIG_PATH這個環境變量中而解決了這個問題,但是重啓後發現方法失效了,再次./configre依然會報出如題的錯誤。

原因是 The environment variables you set this way are valid only while your current shell is open. Once you close it, or if you open another shell, you must reset the variables. Alternately, you can add the variables to your ~/ .bashrc file or /etc/profile (this may vary depending on your OS) so they can initialize with each shell.

最後終於在網上找到一篇詳細說明這個問題的文章:關係到能否成功編譯 /etc /ld.so.conf ; ldconfig ; PKG_CONFIG_PATH

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章