centos:链接没有 pkg-config 的 .pc 文件的库
我正在尝试在 centos 上编译 svg2pdf 。我想我已经成功地使用 yum 安装了所需的依赖项:
sudo yum install librsvg2
sudo yum install cairo
Makefile 包含:
MYCFLAGS=`pkg-config --cflags librsvg-2.0 cairo-pdf` -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -
Wnested-externs -fno-strict-aliasing
MYLDFLAGS=`pkg-config --libs librsvg-2.0 cairo-pdf`
输入“make”后,前几行输出是:
cc `pkg-config --cflags librsvg-2.0 cairo-pdf` -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing `pkg-config --libs librsvg-2.0 cairo-pdf` svg2pdf.c -o svg2pdf
Package librsvg-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `librsvg-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'librsvg-2.0' found
此系统上没有 librsvg-2.0.pc(但有时)我在我的 macbookpro 上使用 macports 安装了这个)。
我应该如何链接这个包?我应该更改 Makefile,如果是,更改什么?我应该生成 .pc 文件吗?如果是,如何生成?或者有其他方法可以解决这个问题吗?
或者,有没有人在 centos 上成功安装 svg2pdf ,如果是的话,你是如何管理的?
我在 Linux 上没有太多经验,所以我可能会遗漏一些明显的东西。
I'm trying to compile svg2pdf on centos. I think I've managed to get the required dependencies installed using yum:
sudo yum install librsvg2
sudo yum install cairo
The Makefile contains:
MYCFLAGS=`pkg-config --cflags librsvg-2.0 cairo-pdf` -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -
Wnested-externs -fno-strict-aliasing
MYLDFLAGS=`pkg-config --libs librsvg-2.0 cairo-pdf`
After typing 'make', the first couple of lines of output are:
cc `pkg-config --cflags librsvg-2.0 cairo-pdf` -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing `pkg-config --libs librsvg-2.0 cairo-pdf` svg2pdf.c -o svg2pdf
Package librsvg-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `librsvg-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'librsvg-2.0' found
There is no librsvg-2.0.pc on this system (but there is when I installed this using macports on my macbookpro).
How should I get this package linked? Should I change the Makefile, and if so, to what? Should I generate the .pc files, and if so, how? Or is there another way to resolve this?
Or, has anyone been successful at installing svg2pdf on centos, and, if so, how did you manage it?
I don't have much experience on linux, so I might be missing something obvious.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为 CentOS 使用
-devel
包。您安装了librsvg2-devel
和cairo-devel
吗?I think CentOS uses
-devel
packages. Have you installedlibrsvg2-devel
andcairo-devel
?