在Mac OS X 1.7.5 /獅子包開羅沒有在pkg配置搜索路徑發現
我嘗試使用安裝包開羅自制
brew install cairo => PASSED
==> Downloading http://cairographics.org/releases/cairo-1.12.16.tar.xz
Already downloaded: /Library/Caches/Homebrew/cairo-1.12.16.tar.xz
==> ./configure --prefix=/usr/local/Cellar/cairo/1.12.16 --with-x --enable-gobject=yes
==> make install
==> Caveats
This formula is keg-only: so it was not symlinked into /usr/local.
Mac OS X already provides this software in versions before Mountain Lion.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/cairo/lib
CPPFLAGS: -I/usr/local/opt/cairo/include
==> Summary
/usr/local/Cellar/cairo/1.12.16: 105 files, 8.0M, built in 2.5 minutes
當我嘗試編譯我的代碼我仍然得到這樣的:
+++ Precompile
Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
Package 'cairo', required by 'pangocairo', not found
所以我相應地調整我的PKG_CONFIG_PATH
PKG_CONFIG_PATH=/usr/local/opt/cairo/lib/pkgconfig/:/usr/local/lib/pkgconfig:/usr/X11/lib/pkgconfig/:
(source .bash_profile)
試圖再次編譯,但我得到完全相同的錯誤。
確認該文件存在於該pkgconfig目錄中。
ls /usr/local/opt/cairo/lib/pkgconfig/
cairo-fc.pc cairo-gobject.pc cairo-png.pc cairo-quartz-font.pc cairo-script.pc cairo-xcb-shm.pc cairo-xlib-xrender.pc cairo.pc
cairo-ft.pc cairo-pdf.pc cairo-ps.pc cairo-quartz.pc cairo-svg.pc cairo-xcb.pc cairo-xlib.pc
這裏有什麼問題嗎?
UPDATE
cairo.pc坐落在我的系統過於地方。我在PGG配置路徑中使用每個位置的嘗試沒有成功
find /usr -name cairo.pc
/usr/local/Cellar/cairo/1.12.16/lib/pkgconfig/cairo.pc
/usr/X11/lib/pkgconfig/cairo.pc
pkg-config --variable pc_path pkg-config
/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig
大家好,我的問題是與你相似,只有當我執行你的命令它說,該文件已經存在,當我嘗試建立rrdtool的安裝(使用開羅)仍不能在pkgconfig找到它。 是否有一套我應該運行所有命令的命令? 還有什麼可能讓我達到預期效果嗎? – AKFourSeven
我在/ usr/local/path下沒有Cellar文件夾,並且安裝了libcairo2。 –