2013-05-10 107 views
0

我試圖安裝Cairo Perl module本地,但它扔我的錯誤。開羅的Perl模塊安裝問題

$ /testdir/bin/perl -I /testdir/perl-5.14.0/lib Makefile.PL 
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 
No package 'cairo' found 
at Makefile.PL line 99 
*** can not find package cairo >= 1.0.0 
*** check that it is properly installed and available in PKG_CONFIG_PATH 
at Makefile.PL line 99 

我可以按照安裝程序的建議去,但我沒有在安裝包中找到名爲cairo.pc的文件。不知道我在這裏錯過了什麼。請幫助我。

+0

你從CPAN下載開羅? 'Makefile.PL'屬於哪個模塊? – 2013-05-10 18:11:58

+0

是的,我下載了它從CPAN,http://search.cpan.org/dist/Cairo/ – chidori 2013-05-10 18:26:39

回答

2

該模塊只包含Cairo的Perl綁定。你需要有C庫(與C頭文件)第一次安裝,否則就沒有爲那些綁定綁定。

http://cairographics.org/download/是開始爲工作從哪裏得到那些來自(這取決於您的操作系統)的好地方。

+0

你好,能否請您進一步解釋在這個問題上,我使用的Solaris – chidori 2013-05-10 18:27:20

+1

開羅的Perl模塊不是開羅。這是一種從Perl使用開羅的方式。你必須先安裝開羅。 – Quentin 2013-05-10 18:29:03

0

我面臨着同樣的問題,看到昆汀回答很明顯,你需要先安裝開羅。我做了下面,開羅得到安裝成功。

對於Debian和Debian衍生物包括Ubuntu:

sudo apt-get install libcairo2-dev 

適用於Fedora:

sudo yum install cairo-devel 

openSUSE的:

zypper install cairo-devel 

現在安裝的Perl模塊

cpan Cairo 

cpanm Cairo