zoukankan      html  css  js  c++  java
  • puppet aix package 之rsync安装

    AIX中使用RPM安装RSync遇到的问题及解决办法

    最近在折腾AIX的系统,它里面本来有一个包管理工具叫installp,但是俺不会用,也不知道从那里找包。

    幸亏AIX提供了RPM的支持,所以安装软件还是用了最熟悉的RPM包。装了Puppet和MCollective。然后我就开始做管理了,但是在后面装rsync的时候出现了一个问题。

    AIX中的软件包基本上有3个来源,分别是

    接下来继续说rsync,我下载的地址是http://www.bullfreeware.com/affichage.php?id=1653。

    依赖分别有gettext, popt, libiconv,我也装上了。但是在执行rsync的命令的时候出错,错误大概是下面这个样子,因为我们的生产环境限制太严格,这是我记忆下来的大概的错误的样子。

    exec(): 0509-036 Cannot load program /usr/bin/rsync because of the following errors:
    0509-022 Cannot load module /usr/lib/popt.a(popt.so).
    0509-150 Dependent module /usr/lib/libiconv.a(libiconv.so.2) could not be loaded.
    0509-152 Member libiconv.so.2 is not found in archive
    0509-022 Cannot load module rpm.
    0509-150 Dependent module /usr/lib/popt.a(popt.so). could not be loaded.
    0509-022 Cannot load module .

    它 是说不能加载libiconv.so.2,我去找了下,确实没有这个文件,libiconv.a到是有的。然后用rpm -ql libiconv这个包查看,列表里面也有没有libconv.so.2呀,奇怪了。然后使用ldd /usr/bin/rsync命令查看它需要的共享库的时候也是报找不到libiconv.so.2这个文件。

    按理来说,libiconv.so.2这个名字的文件,肯定是属于libiconv这个包的,但是为什么它包里面就没有呢?我就开始在Google上找了,找啊找,翻了半天,看到了这个讨论。http://bbs.chinaunix.net/thread-1692140-1-1.html,这里最后[yddll](http://bbs.chinaunix.net/space-uid-46610.html)给了个提示,说是man ar。

    于是我就来man了

    AR(1)                        GNU Development Tools                       AR(1)

    NAME
    ar - create, modify, and extract from archives

    SYNOPSIS
    ar [—plugin name] [-X32_64] [-]p[mod [relpos] [count]] archive
    [member…]

    DESCRIPTION
    The GNU ar program creates, modifies, and extracts from archives. An
    archive is a single file holding a collection of other files in a
    structure that makes it possible to retrieve the original individual
    files (called members of the archive).

       The original files’ contents, mode (permissions), timestamp, owner, and
       group are preserved in the archive, and can be restored on extraction.
    
       GNU ar can maintain archives whose members have names of any length;
       however, depending on how ar is configured on your system, a limit on
       member-name length may be imposed for compatibility with archive
       formats maintained with other tools.  If it exists, the limit is often
       15 characters (typical of formats related to a.out) or 16 characters
       (typical of formats related to coff).</pre>

    创建,修改,解压archives,既然人家提示了,那我就试试呗

    >ar -v -t /usr/lib/libiconv.a
    r—r—r— 2/2 116968 Nov 10 17:22 2010 shr4.o
    r—r—r— 2/2 117218 Nov 10 17:22 2010 shr.o

    就在试完之后,我忽然想到一点,不对呀,我使用rpm安装的软件都是放在了/opt/freeware下面,然后做的软链接到实际的目录,但是这个文件好像不是link,然后分别查看了下这两个文件
    ls -l /usr/lib/libiconv.a
    ls -l /opt/freeware/lib/libiconv.a

    抱歉,还是上面的原因,查看的结果我没办法贴出来。反正区别是这两个不一样大,我又使用ar命令查看了下/opt下的那个libiconv.a,结果就发现了libiconv.so.2文件。

    所以最终的解决办法是,删掉/usr/lib/libiconv.a,然后创建link文件指向/opt/freeware/lib/libiconv.a,再次执行rsync命令,成功,搞定。

    updated 2013.10.17

    后来发现,使用IBM官网的包就不会有这样的问题,所以以后我都会尽量在AIX上用官网的RPM包。

  • 相关阅读:
    基础笔记8(二)(容器-引用类型的排序)
    OO的五大原则是指SRP、OCP、LSP、DIP、ISP。
    基础笔记9(泛型)
    insert statements will fail to restore data from temporary table. you must correct statements preceded by a warning comment in spcript.
    sqlserver 官方文档
    sqlserver 时间格式转换汇总:日、周、月、年、小时、分钟、秒 等。
    sqlserver查询一天中时间最大的那行数据
    PowerDesigner设计表时显示注释列Comment(转载)
    无法访问网页:多是域名或ip地址错误。
    远程报错,本地完全没问题,多是配置文件错误!
  • 原文地址:https://www.cnblogs.com/ruiy/p/aixPackages.html
Copyright © 2011-2022 走看看