AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 528009
Accepted
Chloe
Chloe
Asked: 2013-08-02 07:41:18 +0800 CST2013-08-02 07:41:18 +0800 CST 2013-08-02 07:41:18 +0800 CST

在 CentOS 上安装 xmlsec

  • 772

我安装了 xmlsec,当我尝试验证 XML 文档时它一直给我一个错误。

yum install xmlsec1
yum install xmlsec1-openssl


[vagrant@localhost SSO-ROR-development]$ xmlsec1 --verify ../tmp_SAML_Sample.xml
func=xmlSecCryptoDLLibraryCreate:file=dl.c:line=146:obj=lt_dlopenext:subj=unknown:error=7:io function failed:filename=libxmlsec1-openssl
func=xmlSecCryptoDLGetLibraryFunctions:file=dl.c:line=498:obj=unknown:subj=xmlSecCryptoDLLibraryCreate:error=1:xmlsec library function failed:crypto=openssl
func=xmlSecCryptoDLLoadLibrary:file=dl.c:line=449:obj=unknown:subj=xmlSecCryptoDLGetLibraryFunctions:error=1:xmlsec library function failed:
Error: unable to load xmlsec-openssl library. Make sure that you have
this it installed, check shared libraries path (LD_LIBRARY_PATH)
envornment variable or use "--crypto" option to specify different
crypto engine.
Error: initialization failed
Usage: xmlsec <command> [<options>] [<files>]

Report bugs to http://www.aleksey.com/xmlsec/bugs.html
Written by Aleksey Sanin <[email protected]>.
Copyright (C) 2002-2003 Aleksey Sanin.
This is free software: see the source for copying information.

func=xmlSecCryptoShutdown:file=app.c:line=69:obj=unknown:subj=cryptoShutdown:error=9:feature is not implemented:
func=xmlSecAppCryptoShutdown:file=crypto.c:line=48:obj=unknown:subj=xmlSecCryptoShutdown:error=1:xmlsec library function failed:
Error: xmlsec crypto shutdown failed.


[vagrant@localhost SSO-ROR-development]$ ls $LD_LIBRARY_PATH/*xmlsec*
/usr/lib64/libxmlsec1-openssl.so.1  /usr/lib64/libxmlsec1-openssl.so.1.2.16  /usr/lib64/libxmlsec1.so.1  /usr/lib64/libxmlsec1.so.1.2.16


[root@localhost SSO-ROR-development]# uname -a
Linux localhost.localdomain 2.6.32-279.14.1.el6.x86_64 #1 SMP Tue Nov 6 23:43:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
centos
  • 2 2 个回答
  • 10929 Views

2 个回答

  • Voted
  1. Best Answer
    Etan Reisner
    2013-08-02T08:05:39+08:002013-08-02T08:05:39+08:00

    我相信你已经遇到了这个错误。我刚刚在 CentOS 5 机器和 EPEL 5 上复制了它。如果你问我,这是一个在运输 RPM 中非常糟糕的错误。

    幸运的是,解决方法还不错。在正常位置创建符号链接(我通常不推荐)或创建一个目录并将符号链接放在那里并使用 LD_LIBRARY_PATH 指向那里。(我不确定为什么你已经在你的环境中设置了 LD_LIBRARY_PATH ,除非那是一次调试尝试。)

    • 3
  2. ALex_hha
    2013-08-02T08:06:16+08:002013-08-02T08:06:16+08:00
    # rpm -ql xmlsec1-openssl
    /usr/lib64/libxmlsec1-openssl.so.1
    /usr/lib64/libxmlsec1-openssl.so.1.2.16
    

    正如我从 strace 输出中看到的

    open("/lib64/libxmlsec1-openssl.la", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/lib64/libxmlsec1-openssl.la", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/lib/libxmlsec1-openssl.la", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/lib/libxmlsec1-openssl.la", O_RDONLY) = -1 ENOENT (No such file or directory)
    access("/lib64/libxmlsec1-openssl.so", R_OK) = -1 ENOENT (No such file or directory)
    access("/usr/lib64/libxmlsec1-openssl.so", R_OK) = -1 ENOENT (No such file or directory)
    access("/lib/libxmlsec1-openssl.so", R_OK) = -1 ENOENT (No such file or directory)
    access("/usr/lib/libxmlsec1-openssl.so", R_OK) = -1 ENOENT (No such file or directory)
    open("tls/x86_64/libxmlsec1-openssl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("tls/libxmlsec1-openssl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("x86_64/libxmlsec1-openssl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("libxmlsec1-openssl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/etc/ld.so.cache", O_RDONLY)      = 3
    fstat(3, {st_mode=S_IFREG|0644, st_size=38616, ...}) = 0
    mmap(NULL, 38616, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc634861000
    close(3)                                = 0
    open("/lib64/tls/x86_64/libxmlsec1-openssl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat("/lib64/tls/x86_64", 0x7fff6b286950) = -1 ENOENT (No such file or directory)
    open("/lib64/tls/libxmlsec1-openssl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat("/lib64/tls", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
    open("/lib64/x86_64/libxmlsec1-openssl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat("/lib64/x86_64", 0x7fff6b286950)   = -1 ENOENT (No such file or directory)
    open("/lib64/libxmlsec1-openssl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat("/lib64", {st_mode=S_IFDIR|0555, st_size=12288, ...}) = 0
    open("/usr/lib64/tls/x86_64/libxmlsec1-openssl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat("/usr/lib64/tls/x86_64", 0x7fff6b286950) = -1 ENOENT (No such file or directory)
    open("/usr/lib64/tls/libxmlsec1-openssl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat("/usr/lib64/tls", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
    open("/usr/lib64/x86_64/libxmlsec1-openssl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat("/usr/lib64/x86_64", 0x7fff6b286950) = -1 ENOENT (No such file or directory)
    open("/usr/lib64/libxmlsec1-openssl.so", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat("/usr/lib64", {st_mode=S_IFDIR|0555, st_size=36864, ...}) = 0
    munmap(0x7fc634861000, 38616)           = 0
    write(2, "func=xmlSecCryptoDLLibraryCreate"..., 137func=xmlSecCryptoDLLibraryCreate:file=dl.c:line=146:obj=lt_dlopenext:subj=unknown:error=7:io function failed:filename=libxmlsec1-openssl
    ) = 137
    write(2, "func=xmlSecCryptoDLGetLibraryFun"..., 157func=xmlSecCryptoDLGetLibraryFunctions:file=dl.c:line=498:obj=unknown:subj=xmlSecCryptoDLLibraryCreate:error=1:xmlsec library function failed:crypto=openssl
    ) = 157
    write(2, "func=xmlSecCryptoDLLoadLibrary:f"..., 142func=xmlSecCryptoDLLoadLibrary:file=dl.c:line=449:obj=unknown:subj=xmlSecCryptoDLGetLibraryFunctions:error=1:xmlsec library function failed:
    ) = 142
    write(2, "Error: unable to load xmlsec-ope"..., 216Error: unable to load xmlsec-openssl library. Make sure that you have
    this it installed, check shared libraries path (LD_LIBRARY_PATH)
    envornment variable or use "--crypto" option to specify different
    crypto engine.
    ) = 216
    write(2, "Error: initialization failed\n", 29Error: initialization failed
    

    xmlsec1-openssl 查找的是 libxmlsec1-openssl.so 而不是 libxmlsec1-openssl.so.1。你可以试着做这个把戏

    # cd /usr/lib64/
    # ln -s libxmlsec1-openssl.so.1 libxmlsec1-openssl.so
    
    • 2

相关问题

  • 如何在 Linux 机器上找到有关硬件的详细信息?

  • 使用 crontab 和 /etc/cron.hourly,daily,weekly 的区别

  • 持续监控许多服务器运行状况的简单方法?

  • Hudson 无法在 tomcat5 中启动

  • CentOS 的依赖挑战

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve