加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

我怎样才能使用32位Perl来解冻64位Storable冻结的东西?

发布时间:2020-12-15 23:33:20 所属栏目:大数据 来源:网络整理
导读:我正在尝试解冻在64位Solaris(生产)计算机上使用Storable冻结的数据库BLOB.当我尝试在32位 Windows(开发)PC上解冻时,我收到“字节顺序不兼容错误”. perl -v (on solaris)This is perl,v5.8.8 built for i86pc-solaris-64perl -v (on Windows)This is perl,v
我正在尝试解冻在64位Solaris(生产)计算机上使用Storable冻结的数据库BLOB.当我尝试在32位 Windows(开发)PC上解冻时,我收到“字节顺序不兼容错误”.

perl -v (on solaris)
This is perl,v5.8.8 built for i86pc-solaris-64

perl -v (on Windows)
This is perl,v5.10.1 built for MSWin32-x86-multi-thread

确切的错误是:

(Unable to read: Byte order is not compatible at bliblibStorable.pm (autosplit into  bliblibautoStorablethaw.al) line 415,at ../handlers/Search/actions/SearchSendQueue.pm line 124 )

SearchSendQueue.pm的第124行:

my $object = thaw( $item->{object} );

有谁知道如何在32位机器上解冻这个对象?

注意:该对象有效且可在64位生产计算机上运行.
我已经尝试过“$Storable :: interwork_56_64bit = 1;”正如其他论坛所建议的那样

解决方法

Storable文档说:

Storable writes a file header which contains the sizes of various C language types for the C compiler that built Storable (when not writing in network order),and will refuse to load files written by a Storable not on the same (or compatible) architecture.

在同一节中,他们认为Storable的基本用法是局部和FAST持久性方法.但是,您可以使用nstore以网络字节顺序存储持久化结构.结果是它读取和存储速度较慢,但??适用于所有平台.

因此建议您必须使用64位计算机使用nstore以网络顺序读取和重新存储数据.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读