1

我在 64 位 Centos 6.6 上并想安装 libidn2-devel。我试过yum install libidn2-devel了,但没有用。我尝试从 Internet 上的各个网站下载 rpm(手动解决递归依赖关系!)

(不是这样)很快我就停留在依赖项之一

libidn2.so.0()(64bit) is needed by libidn2-devel-0.10-1.sdl7.x86_64

我在 Internet 上的任何地方都找不到(对于 CentOS)。

最终,我下载了源代码并尝试构建它。

wget -c ftp://alpha.gnu.org/gnu/libidn/libidn2-0.10.tar.gz
tar -xvzf libidn2-0.10.tar.gz
./configure
make

成功!

然而,当我用它来运行一个模块时,它给了我

error: idn2.h: No such file or directory
<idn2_variable> was not declared in this scope

PS:RPM 看起来很奇怪

$ rpm -q libidn2-devel
package libidn2-devel is not installed
$ rpm -q libidn2
libidn2-2.0.4-1.el6.x86_64
4

1 回答 1

1

libidn2-devel通过EPEL Repo提供

Name        : libidn2-devel
Arch        : x86_64
Version     : 2.0.4
Release     : 1.el6
Size        : 54 k
Repo        : epel
Summary     : Development files for libidn2
URL         : https://www.gnu.org/software/libidn/#libidn2
License     : (GPLv2+ or LGPLv3+) and GPLv3+
Description : The libidn2-devel package contains libraries and header files for
            : developing applications that use libidn2.

此处的 wiki 页面将为您提供更多详细信息,如果您想安装 EPEL 以供使用,yum则应将其下载(并安装) rpm您的系统,然后签入/etc/yum.repos.d/epel.repo它将离开的配置文件。在里面你需要检查该[EPEL]部分是否有行enabled=1(我认为它默认禁用)

您可能想要/需要清理您尝试手动安装的内容,以避免任何更新等问题。

于 2017-09-27T17:10:10.430 回答