Perl on MacOS X 10.6.2: GDBM_File missing, how to install or work around?

冷暖自知 提交于 2019-12-01 08:14:20
draegtun

GDBM_File is a core Perl module. This is why its trying to upgrade your Perl to latest version when you install this module.

It seems Mac OS X doesn't come with GDBM and therefore haven't built and included the necessary modules with any of its provided development languages. And this seems to have been the case for quite some time.

So your first obstacle is the install/compile GDBM. MacPorts does provide a package.

GDBM_File is a XS module so you will have to compile it. The Perl 5.10.0 GDBM_File code can be found here.

BTW: MARC::Charset only switched to GDBM_File at version 1.1 (latest version). The previous version 1.0 used SDBM_File which does come with Perl on Mac OS X (though haven't personally tested it works).

So you may find downloading previous version of MARC::Charset a better option to try.

You have two alternatves: fix MARC::Charset so it doesn't need GDBM_File, or build your own Perl.

Honestly, building your own Perl is probably faster and safer. If you've never installed Perl before, I recommend you use MacPorts (http://macports.org), which will install it in /opt/local/bin/perl. You can then use "/opt/local/bin/cpan MARC::Charset" to install the module you need.

MacPorts doesn't by default build a threaded Perl - I know there's woojy-woojy on the install to do that, but I'm allergic to threads from my initial exposure to them and have never bothered to figure out what it is.

I eventually solved the problem by using the previous version of MARC::Charset. The previous version did not use GDBM_File but another facility. That was the only change between the versions, and the reason for the change was not stated.

Using the previous version fixed everything.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!