安装TSAMP组件报错。

DB2自带的HA组件TSAMP. 这个组件安装的时候对操作系统比较挑剔。
举例:
DB2 9.5支持的版本:

• SUSE Linux Enterprise Server 10 (SLES 10) 32-, 64-bit
• SUSE Linux Enterprise Server 11 (SLES 11) 32-, 64-bit
• Red Hat Enterprise Linux 5.0 32-, 64-bit
• Windows Server 2008 R1 Standard Edition 32-, 64-bit
• Windows Server 2008 R1 Enterprise Edition 32-, 64-bit
• Windows Server 2008 R2 Standard Edition 64-bit
• Windows Server 2008 R2 Enterprise Edition 64-bit

与此同时。DB2 9.5 本身的支持的操作系统,别这个多很多。
最令人崩溃的是TSAMP不支持Centos版本。 只支持Red Hat 操作系统。
Redhat 不是注册用户还不能使用yum 安装包。安装Linux的package.
这就很尴尬了。
从9.5–10.5.3 TSAMP自带的安装包都是3.2.**的版本。大大的限制了操作系统使用范围。

信息中心上说:9.5.10的版本支持Redhat 6的版本。
最新版本是这个:Linux distributions • Db2 V11.1 GA: TSA 4.1.0.3

所以我就安装了一个Redhat 6.9的版本。
由于不是redhat的注册用户。 强制删除掉Redhat的yum源。配置了Centos的yum源。

安装DB2 及 TSAMP.
首先报错:

  The 32 bit library file libstdc++.so.5 is not found on the system.
   32-bit applications may be affected.

解决方式:

yum -y install libstdc++.so.5
yum -y install compat-libstdc++-33.x86_64

安装过程中。DB2 precheck检查通过,DB2其他的组件都可以安装成功。但是TSAMP这个组件会安装失败。

使用安装脚本单独安装:
prereqSAM 安装前的检查报错。

Error: The rpm package is installed, but the following part was not found:  'libstdc++-4.4.7-18.el6.x86_64' '/usr/lib/libstdc++.so.6'
prereqSAM: Error: The rpm package is installed, but the following part was not found:  'pam-1.1.1-24.el6.x86_64' '/lib/libpam.so.0'
prereqSAM: Error: Prerequisite checking for the ITSAMP installation failed:  Linux i386x RH

完整日志:

prereqSAM: >>> Prerequisite on test02 check - log started : Tue Feb 19 16:55:20 PST 2019
prereqSAM:  OPTIONS         = ''
prereqSAM:  OPT_SILENT      = 0
prereqSAM:  OPT_NOLICCHECK  = 0
prereqSAM: Detected operating system:  Linux
prereqSAM: Detected architecture:  i386x
prereqSAM: Detected distribution:  RH
prereqSAM: Supported operating system versions:  RH Linux i386x - 5.0 6.0
prereqSAM: Detected operating system version: 
Red Hat Enterprise Linux Server release 6.9 (Santiago)
prereqSAM: rpm package and version installed:  'ksh'
prereqSAM: Using default prerequisite checking on the following rpm package:  'perl'
prereqSAM: rpm package and version installed:  'perl-5.10.1-144.el6.x86_64' '/perl'
prereqSAM: Using default prerequisite checking on the following rpm package:  'libstdc++'
prereqSAM: rpm package and version installed:  'libstdc++-4.4.7-23.el6.x86_64
libstdc++-4.4.7-23.el6.i686' '/usr/lib/libstdc++.so.6'
prereqSAM: Using default prerequisite checking on the following rpm package:  'libstdc++'
prereqSAM: rpm package and version installed:  'libstdc++-4.4.7-23.el6.x86_64
libstdc++-4.4.7-23.el6.i686' '/usr/lib64/libstdc++.so.6'
prereqSAM: Using default prerequisite checking on the following rpm package:  'compat-libstdc++-33'
prereqSAM: rpm package and version installed:  'compat-libstdc++-33-3.2.3-69.el6.x86_64
compat-libstdc++-33-3.2.3-69.el6.i686' '/usr/lib64/libstdc++.so.5'
prereqSAM: Using default prerequisite checking on the following rpm package:  'pam'
prereqSAM: Error: The rpm package is installed, but the following part was not found:  'pam-1.1.1-24.el6.x86_64' '/lib/libpam.so.0'
prereqSAM: Error: Prerequisite checking for the ITSAMP installation failed:  Linux i386x RH
Red Hat Enterprise Linux Server release 6.9 (Santiago)
prereqSAM: Most severe error code returned:  20
prereqSAM: One or more prerequisite packages have an incorrect version. 
prereqSAM: <<< Prerequisite on test02 check - log ended : Tue Feb 19 16:55:21 PST 2019

解决方式:
yum install libstdc++.i686
这种方式会报错。 报文件冲突和 libstdc++.X86_64
这样安装问题解决:yum install libstdc++

root@test02 tsamp]# yum install libstdc++
Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Setting up Install Process
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package libstdc++.x86_64 0:4.4.7-18.el6 will be updated
---> Package libstdc++.x86_64 0:4.4.7-23.el6 will be an update
--> Finished Dependency Resolution
...
..
PackageKit-0.5.8-26.el6.x86_64 has missing requires of PackageKit-yum = ('0', '0.5.8', '26.el6')
PackageKit-0.5.8-26.el6.x86_64 has missing requires of PackageKit-yum-plugin = ('0', '0.5.8', '26.el6')
rhn-check-1.0.0.1-43.el6.noarch has missing requires of yum-rhn-plugin >= ('0', '0.9.1', '35')
  Updating   : libstdc++-4.4.7-23.el6.x86_64                                       1/2
  Cleanup    : libstdc++-4.4.7-18.el6.x86_64                                       2/2
  Verifying  : libstdc++-4.4.7-23.el6.x86_64                                       1/2
  Verifying  : libstdc++-4.4.7-18.el6.x86_64                                       2/2

Updated:
  libstdc++.x86_64 0:4.4.7-23.el6

Complete!

再去安装i686版本的包就可以成功。

[root@test02 tsamp]# yum install libstdc++.i686
Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Setting up Install Process
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package libstdc++.i686 0:4.4.7-23.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================
 Package              Arch            Version                    Repository       Size
=======================================================================================
Installing:
 libstdc++            i686            4.4.7-23.el6               base            303 k

Transaction Summary
=======================================================================================
Install       1 Package(s)

Total download size: 303 k
Installed size: 908 k
Is this ok [y/N]: y
Downloading Packages:
libstdc++-4.4.7-23.el6.i686.rpm                                 | 303 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : libstdc++-4.4.7-23.el6.i686                                         1/1
  Verifying  : libstdc++-4.4.7-23.el6.i686                                         1/1

Installed:
  libstdc++.i686 0:4.4.7-23.el6

Complete!

这个问题解决了:

Error: The rpm package is installed, but the following part was not found: ‘libstdc+±4.4.7-18.el6.x86_64’ ‘/usr/lib/libstdc++.so.6’

解决完了之后显示的日志:
prereqSAM: rpm package and version installed: ‘libstdc+±4.4.7-23.el6.x86_64 libstdc+±4.4.7-23.el6.i686’ ‘/usr/lib/libstdc++.so.6’

另外一个问题同样的思路。
重新安装pam 64的包。再去安装32位的包。
yum install pam.i686

[root@test02 yum.repos.d]# yum reinstall pam
Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Setting up Reinstall Process
Loading mirror speeds from cached hostfile
 * base: mirrors.huaweicloud.com
 * centosplus: mirrors.huaweicloud.com
 * contrib: mirrors.huaweicloud.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
No Match for argument: pam.i686
Package(s) pam.i686 available, but not installed.
Resolving Dependencies
--> Running transaction check
---> Package pam.x86_64 0:1.1.1-24.el6 will be reinstalled
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================
 Package                    Arch                          Version                               Repository                   Size
==================================================================================================================================
Reinstalling:
 pam                        x86_64                        1.1.1-24.el6                          base                        659 k

Transaction Summary
==================================================================================================================================
Reinstall     1 Package(s)

Total download size: 659 k
Installed size: 2.3 M
Is this ok [y/N]: y
Downloading Packages:
pam-1.1.1-24.el6.x86_64.rpm                                                                                | 659 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows:
PackageKit-0.5.8-26.el6.x86_64 has missing requires of PackageKit-yum = ('0', '0.5.8', '26.el6')
PackageKit-0.5.8-26.el6.x86_64 has missing requires of PackageKit-yum-plugin = ('0', '0.5.8', '26.el6')
rhn-check-1.0.0.1-43.el6.noarch has missing requires of yum-rhn-plugin >= ('0', '0.9.1', '35')
  Installing : pam-1.1.1-24.el6.x86_64                                                                                        1/1
  Verifying  : pam-1.1.1-24.el6.x86_64                                                                                        1/1

Installed:
  pam.x86_64 0:1.1.1-24.el6

Complete!
[root@test02 yum.repos.d]# yum install pam.i686
Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.huaweicloud.com
 * centosplus: mirrors.huaweicloud.com
 * contrib: mirrors.huaweicloud.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package pam.i686 0:1.1.1-24.el6 will be installed
--> Processing Dependency: libselinux.so.1 for package: pam-1.1.1-24.el6.i686
--> Processing Dependency: libdb-4.7.so for package: pam-1.1.1-24.el6.i686
--> Processing Dependency: libcrack.so.2 for package: pam-1.1.1-24.el6.i686
--> Processing Dependency: libaudit.so.1 for package: pam-1.1.1-24.el6.i686
--> Running transaction check
---> Package audit-libs.i686 0:2.4.5-6.el6 will be installed
---> Package cracklib.i686 0:2.8.16-4.el6 will be installed
---> Package db4.i686 0:4.7.25-22.el6 will be installed
---> Package libselinux.i686 0:2.0.94-7.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================
 Package                          Arch                       Version                             Repository                  Size
==================================================================================================================================
Installing:
 pam                              i686                       1.1.1-24.el6                        base                       660 k
Installing for dependencies:
 audit-libs                       i686                       2.4.5-6.el6                         base                        75 k
 cracklib                         i686                       2.8.16-4.el6                        base                        70 k
 db4                              i686                       4.7.25-22.el6                       base                       581 k
 libselinux                       i686                       2.0.94-7.el6                        base                       109 k

Transaction Summary
==================================================================================================================================
Install       5 Package(s)

Total size: 1.5 M
Installed size: 4.2 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : db4-4.7.25-22.el6.i686                                                                                         1/5
  Installing : audit-libs-2.4.5-6.el6.i686                                                                                    2/5
  Installing : cracklib-2.8.16-4.el6.i686                                                                                     3/5
  Installing : libselinux-2.0.94-7.el6.i686                                                                                   4/5
  Installing : pam-1.1.1-24.el6.i686                                                                                          5/5
  Verifying  : libselinux-2.0.94-7.el6.i686                                                                                   1/5
  Verifying  : cracklib-2.8.16-4.el6.i686                                                                                     2/5
  Verifying  : audit-libs-2.4.5-6.el6.i686                                                                                    3/5
  Verifying  : db4-4.7.25-22.el6.i686                                                                                         4/5
  Verifying  : pam-1.1.1-24.el6.i686                                                                                          5/5

Installed:
  pam.i686 0:1.1.1-24.el6

Dependency Installed:
  audit-libs.i686 0:2.4.5-6.el6    cracklib.i686 0:2.8.16-4.el6    db4.i686 0:4.7.25-22.el6    libselinux.i686 0:2.0.94-7.el6

Complete!

分析原因:由于系统是Redhat的有些包已经安装上了,并且是64位的包。配置的YUM源是Centos.这个时候再去安装同样的包的32位系统。
难免会有冲突。解决的思路就是重新安装原来的包。再去安装32位的包。

注意下面的例子中的这里发生了变化。再重新安装了以后。
@anaconda-RedHatEnterpriseLinux-201703082046.x86_64/6.9
变成了@base

--------------------------------------------------------------------------------------
[root@test02 yum.repos.d]# yum list pam
Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirror.jdcloud.com
 * updates: mirror.jdcloud.com
Installed Packages
pam.x86_64                          1.1.1-24.el6                           @anaconda-RedHatEnterpriseLinux-201703082046.x86_64/6.9
Available Packages
pam.i686                            1.1.1-24.el6                           base
---------------------------------------------------------------------------------------------
重新安装pam.x86_64完成以后,以及pam.i686以后。
-----------------------------------------------------------------------------------------
[root@test02 yum.repos.d]# yum list pam
Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
 * base: mirrors.huaweicloud.com
 * centosplus: mirrors.huaweicloud.com
 * contrib: mirrors.huaweicloud.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Installed Packages
pam.i686                                                     1.1.1-24.el6                                                    @base
pam.x86_64                                                   1.1.1-24.el6                                                    @base
   


至此:tsamp 安装脚本检查成功。可以安装。 
[root@test02 tsamp]# ./prereqSAM
prereqSAM: All prerequisites for the ITSAMP installation are met on operating system:
Red Hat Enterprise Linux Server release 6.9 (Santiago)
  
======================= MessagePack for Python ======================= :author: INADA Naoki :version: 0.4.1 :date: 2014-02-17 .. image:: https://secure.travis-ci.org/msgpack/msgpack-python.png :target: https://travis-ci.org/#!/msgpack/msgpack-python What's this ------------ `MessagePack <http://msgpack.org/>`_ is a fast, compact binary serialization format, suitable for similar data to JSON. This package provides CPython bindings for reading and writing MessagePack data. Install --------- You can use ``pip`` or ``easy_install`` to install msgpack:: $ easy_install msgpack-python or $ pip install msgpack-python PyPy ^^^^^ msgpack-python provides pure python implementation. PyPy can use this. Windows ^^^^^^^ When you can't use binary distribution, you need to install Visual Studio or Windows SDK on Windows. (NOTE: Visual C++ Express 2010 doesn't support amd64. Windows SDK is recommanded way to build amd64 msgpack without any fee.) Without extension, using pure python implementation on CPython runs slowly. Notes ----- Note for msgpack 2.0 support ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ msgpack 2.0 adds two types: *bin* and *ext*. *raw* was bytes or string type like Python 2's ``str``. To distinguish string and bytes, msgpack 2.0 adds *bin*. It is non-string binary like Python 3's ``bytes``. To use *bin* type for packing ``bytes``, pass ``use_bin_type=True`` to packer argument. >>> import msgpack >>> packed = msgpack.packb([b'spam', u'egg'], use_bin_type=True) >>> msgpack.unpackb(packed, encoding='utf-8') ['spam', u'egg'] You shoud use it carefully. When you use ``use_bin_type=True``, packed binary can be unpacked by unpackers supporting msgpack-2.0. To use *ext* type, pass ``msgpack.ExtType`` object to packer. >>> import msgpack >>> packed = msgpack.packb(msgpack.ExtType(42, b'xyzzy')) >>> msgpack.unpackb(packed) ExtType(code=42, data='xyzzy') You can use it with ``default`` and ``ext_hook``. See below. Note for msgpack 0.2.x users ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The msgpack 0.3 have some incompatible changes. The default value of ``use_list`` keyword argument is ``True`` from 0.3. You should pass the argument explicitly for backward compatibility. `Unpacker.unpack()` and some unpack methods now raises `OutOfData` instead of `StopIteration`. `StopIteration` is used for iterator protocol only. How to use ----------- One-shot pack & unpack ^^^^^^^^^^^^^^^^^^^^^^ Use ``packb`` for packing and ``unpackb`` for unpacking. msgpack provides ``dumps`` and ``loads`` as alias for compatibility with ``json`` and ``pickle``. ``pack`` and ``dump`` packs to file-like object. ``unpack`` and ``load`` unpacks from file-like object. :: >>> import msgpack >>> msgpack.packb([1, 2, 3]) '\x93\x01\x02\x03' >>> msgpack.unpackb(_) [1, 2, 3] ``unpack`` unpacks msgpack's array to Python's list, but can unpack to tuple:: >>> msgpack.unpackb(b'\x93\x01\x02\x03', use_list=False) (1, 2, 3) You should always pass the ``use_list`` keyword argument. See performance issues relating to use_list_ below. Read the docstring for other options. Streaming unpacking ^^^^^^^^^^^^^^^^^^^ ``Unpacker`` is a "streaming unpacker". It unpacks multiple objects from one stream (or from bytes provided through its ``feed`` method). :: import msgpack from io import BytesIO buf = BytesIO() for i in range(100): buf.write(msgpack.packb(range(i))) buf.seek(0) unpacker = msgpack.Unpacker(buf) for unpacked in unpacker: print unpacked Packing/unpacking of custom data type ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It is also possible to pack/unpack custom data types. Here is an example for ``datetime.datetime``. :: import datetime import msgpack useful_dict = { "id": 1, "created": datetime.datetime.now(), } def decode_datetime(obj): if b'__datetime__' in obj: obj = datetime.datetime.strptime(obj["as_str"], "%Y%m%dT%H:%M:%S.%f") return obj def encode_datetime(obj): if isinstance(obj, datetime.datetime): return {'__datetime__': True, 'as_str': obj.strftime("%Y%m%dT%H:%M:%S.%f")} return obj packed_dict = msgpack.packb(useful_dict, default=encode_datetime) this_dict_again = msgpack.unpackb(packed_dict, object_hook=decode_datetime) ``Unpacker``'s ``object_hook`` callback receives a dict; the ``object_pairs_hook`` callback may instead be used to receive a list of key-value pairs. Extended types ^^^^^^^^^^^^^^^ It is also possible to pack/unpack custom data types using the msgpack 2.0 feature. >>> import msgpack >>> import array >>> def default(obj): ... if isinstance(obj, array.array) and obj.typecode == 'd': ... return msgpack.ExtType(42, obj.tostring()) ... raise TypeError("Unknown type: %r" % (obj,)) ... >>> def ext_hook(code, data): ... if code == 42: ... a = array.array('d') ... a.fromstring(data) ... return a ... return ExtType(code, data) ... >>> data = array.array('d', [1.2, 3.4]) >>> packed = msgpack.packb(data, default=default) >>> unpacked = msgpack.unpackb(packed, ext_hook=ext_hook) >>> data == unpacked True Advanced unpacking control ^^^^^^^^^^^^^^^^^^^^^^^^^^ As an alternative to iteration, ``Unpacker`` objects provide ``unpack``, ``skip``, ``read_array_header`` and ``read_map_header`` methods. The former two read an entire message from the stream, respectively deserialising and returning the result, or ignoring it. The latter two methods return the number of elements in the upcoming container, so that each element in an array, or key-value pair in a map, can be unpacked or skipped individually. Each of these methods may optionally write the packed data it reads to a callback function: :: from io import BytesIO def distribute(unpacker, get_worker): nelems = unpacker.read_map_header() for i in range(nelems): # Select a worker for the given key key = unpacker.unpack() worker = get_worker(key) # Send the value as a packed message to worker bytestream = BytesIO() unpacker.skip(bytestream.write) worker.send(bytestream.getvalue()) Note about performance ------------------------ GC ^^ CPython's GC starts when growing allocated object. This means unpacking may cause useless GC. You can use ``gc.disable()`` when unpacking large message. `use_list` option ^^^^^^^^^^^^^^^^^^ List is the default sequence type of Python. But tuple is lighter than list. You can use ``use_list=False`` while unpacking when performance is important. Python's dict can't use list as key and MessagePack allows array for key of mapping. ``use_list=False`` allows unpacking such message. Another way to unpacking such object is using ``object_pairs_hook``. Test ---- MessagePack uses `pytest` for testing. Run test with following command: $ py.test .. vim: filetype=rst
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值