⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 关于Berkelay数据库的共享源码
💻
📖 第 1 页 / 共 2 页
字号:
                                BerkeleyDB                               Version 0.30                              11th Sept 2006     Copyright (c) 1997-2006 Paul Marquess. All rights reserved. This      program is free software; you can redistribute it and/or modify                  it under the same terms as Perl itself.DESCRIPTION-----------BerkeleyDB is a module which allows Perl programs to make use of thefacilities provided by Berkeley DB version 2 or greater. (Note: ifyou want to use version 1 of Berkeley DB with Perl you need the DB_Filemodule).Berkeley DB is a C library which provides a consistent interface to anumber of database formats. BerkeleyDB provides an interface to allfour of the database types (hash, btree, queue and recno) currentlysupported by Berkeley DB.For further details see the documentation in the file BerkeleyDB.pod.PREREQUISITES-------------Before you can build BerkeleyDB you need to have the followinginstalled on your system:    * To run the test harness for this module, you must make sure that the      directory where you have untarred this module is NOT a network      drive, e.g. NFS or AFS.    * Perl 5.004_04 or greater.    * Berkeley DB Version 2.6.4 or greater      The official web site for Berkeley DB is http://www.sleepycat.com      The latest version of Berkeley DB is always available there. It      is recommended that you use the most recent version available at      the Sleepycat site.      The one exception to this advice is where you want to use BerkeleyDB      to access database files created by a third-party application,      like Sendmail. In these cases you must build BerkeleyDB with a      compatible version of Berkeley DB.BUILDING THE MODULE-------------------Assuming you have met all the prerequisites, building the module shouldbe relatively straightforward.Step 1 : If you are running Solaris 2.5, 2.7 or HP-UX 10 read either         the Solaris Notes or HP-UX Notes sections below.         If you are running Linux please read the Linux Notes section         before proceeding.         If you are running FreeBSD read the FreeBSD Notes section         below.Step 2 : Edit the file config.in to suit you local installation.         Instructions are given in the file.Step 3 : Build and test the module using this sequence of commands:             perl Makefile.PL             make             make testINSTALLATION------------    make installTROUBLESHOOTING===============Here are some of the problems that people encounter when building BerkeleyDB.Missing db.h or libdb.a-----------------------If you get an error like this:  cc -c -I./libraries/ -Dbool=char -DHAS_BOOL -I/usr/local/include -O2  -DVERSION=\"0.07\" -DXS_VERSION=\"0.07\" -fpic  -I/usr/local/lib/perl5/5.00503/i586-linux/CORE  BerkeleyDB.c  BerkeleyDB.xs:52: db.h: No such file or directoryor this:  cc -c -I./libraries/2.7.5 -Dbool=char -DHAS_BOOL -I/usr/local/include -O2  -DVERSION=\"0.07\" -DXS_VERSION=\"0.07\" -fpic  -I/usr/local/lib/perl5/5.00503/i586-linux/CORE  BerkeleyDB.c  LD_RUN_PATH="/lib" cc -o blib/arch/auto/BerkeleyDB/BerkeleyDB.so  -shared  -L/usr/local/lib BerkeleyDB.o  -L/home/paul/perl/ext/BerkDB/BerkeleyDB/libraries -ldb  ld: cannot open -ldb: No such file or directoryThis symptom can imply: 1. You don't have Berkeley DB installed on your system at all.    Solution: get & install Berkeley DB. 2. You do have Berkeley DB installed, but it isn't in a standard place.    Solution: Edit config.in and set the LIB and INCLUDE variables to point              to the directories where libdb.a and db.h are installed.#error db.h is not for Berkeley DB at all.------------------------------------------If you get the error above when building this module it means that thereis a file called "db.h" on your system that isn't the one that comeswith Berkeley DB.Options: 1. You don't have Berkeley DB installed on your system at all.    Solution: get & install Berkeley DB. 2. Edit config.in and make sure the INCLUDE variable points to the    directory where the Berkeley DB file db.h is installed. 3. If option 2 doesn't work, try tempoarily renaming the db.h file    that is causing the error.#error db.h is for Berkeley DB 1.x - need at least Berkeley DB 2.6.4--------------------------------------------------------------------The error above will occur if there is a copy of the Berkeley DB 1.xfile db.h on your system.This error will happen when   1. you only have Berkeley DB version 1 on your system.     Solution: get & install a newer version of Berkeley DB.  2. you have both version 1 and a later version of Berkeley DB     installed on your system. When building BerkeleyDB it attempts to     use the db.h for Berkeley DB version 1.     Solution: Edit config.in and set the LIB and INCLUDE variables               to point to the directories where libdb.a and db.h are               installed.#error db.h is for Berkeley DB 2.0-2.5 - need at least Berkeley DB 2.6.4------------------------------------------------------------------------The error above will occur if there is a copy of the the file db.h forBerkeley DB 2.0 to 2.5 on your system.This symptom can imply: 1. You don't have a new enough version of Berkeley DB.    Solution: get & install a newer version of Berkeley DB. 2. You have the correct version of Berkeley DB installed, but it isn't    in a standard place.    Solution: Edit config.in and set the LIB and INCLUDE variables              to point to the directories where libdb.a and db.h are              installed.Undefined Symbol: txn_stat --------------------------BerkeleyDB seems to have built correctly, but you get an error like thiswhen you run the test harness:  $ make test  PERL_DL_NONLAZY=1 /home/paul/perl/install/bin/perl5.00503  -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5.00503/i586-linux  -I/usr/local/lib/perl5/5.00503 -e 'use Test::Harness qw(&runtests $verbose);  $verbose=0; runtests @ARGV;' t/*.t  t/btree.............Can't load 'blib/arch/auto/BerkeleyDB/BerkeleyDB.so' for  module BerkeleyDB: blib/arch/auto/BerkeleyDB/BerkeleyDB.so:  undefined symbol: txn_stat  at /usr/local/lib/perl5/5.00503/i586-linux/DynaLoader.pm line 169.  ...This error usually happens when you have both version 1 and a newer versionof Berkeley DB installed on your system. BerkeleyDB attemptsto build using the db.h for Berkeley DB version 2/3/4 and the version 1library. Unfortunately the two versions aren't compatible with eachother. BerkeleyDB can only be built with Berkeley DB version 2, 3 or 4.Solution: Setting the LIB & INCLUDE variables in config.in to point to the          correct directories can sometimes be enough to fix this          problem. If that doesn't work the easiest way to fix the          problem is to either delete or temporarily rename the copies          of db.h and libdb.a that you don't want BerkeleyDB to use.Undefined Symbol: db_appinit ----------------------------BerkeleyDB seems to have built correctly, but you get an error like thiswhen you run the test harness:  $ make test  PERL_DL_NONLAZY=1 /home/paul/perl/install/bin/perl5.00561 -Iblib/arch   -Iblib/lib -I/home/paul/perl/install/5.005_61/lib/5.00561/i586-linux   -I/home/paul/perl/install/5.005_61/lib/5.00561 -e 'use Test::Harness   qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t  t/btree.............Can't load 'blib/arch/auto/BerkeleyDB/BerkeleyDB.so' for   module BerkeleyDB: blib/arch/auto/BerkeleyDB/BerkeleyDB.so:   undefined symbol: db_appinit   at /home/paul/perl/install/5.005_61/lib/5.00561/i586-linux/DynaLoader.pm   ...This error usually happens when you have both version 2 and version3 of Berkeley DB installed on your system and BerkeleyDB attemptsto build using the db.h for Berkeley DB version 2 and the version 3library. Unfortunately the two versions aren't compatible with eachother. Solution: Setting the LIB & INCLUDE variables in config.in to point to the          correct directories can sometimes be enough to fix this          problem. If that doesn't work the easiest way to fix the          problem is to either delete or temporarily rename the copies          of db.h and libdb.a that you don't want BerkeleyDB to use.Undefined Symbol: db_create---------------------------BerkeleyDB seems to have built correctly, but you get an error like thiswhen you run the test harness:  $ make test     PERL_DL_NONLAZY=1 /home/paul/perl/install/bin/perl5.00561 -Iblib/arch   -Iblib/lib -I/home/paul/perl/install/5.005_61/lib/5.00561/i586-linux   -I/home/paul/perl/install/5.005_61/lib/5.00561 -e 'use Test::Harness   qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t  t/btree.............Can't load 'blib/arch/auto/BerkeleyDB/BerkeleyDB.so' for   module BerkeleyDB: blib/arch/auto/BerkeleyDB/BerkeleyDB.so:   undefined symbol: db_create   at /home/paul/perl/install/5.005_61/lib/5.00561/i586-linux/DynaLoader.pm   ...This error usually happens when you have both version 2 and version3 of Berkeley DB installed on your system and BerkeleyDB attemptsto build using the db.h for Berkeley DB version 3 and the version 2library. Unfortunately the two versions aren't compatible with eachother. Solution: Setting the LIB & INCLUDE variables in config.in to point to the          correct directories can sometimes be enough to fix this          problem. If that doesn't work the easiest way to fix the          problem is to either delete or temporarily rename the copies          of db.h and libdb.a that you don't want BerkeleyDB to use.Incompatible versions of db.h and libdb---------------------------------------BerkeleyDB seems to have built correctly, but you get an error like thiswhen you run the test harness:  $ make test  PERL_DL_NONLAZY=1 /home/paul/perl/install/bin/perl5.00503  -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5.00503/i586-linux  -I/usr/local/lib/perl5/5.00503 -e 'use Test::Harness qw(&runtests $verbose);  $verbose=0; runtests @ARGV;' t/*.t  t/btree.............  BerkeleyDB needs compatible versions of libdb & db.h          you have db.h version 2.6.4 and libdb version 2.7.5  BEGIN failed--compilation aborted at t/btree.t line 25.  dubious        Test returned status 255 (wstat 65280, 0xff00)  ...	Another variation on the theme of having two versions of Berkeley DB onyour system. Solution: Setting the LIB & INCLUDE variables in config.in to point to the          correct directories can sometimes be enough to fix this          problem. If that doesn't work the easiest way to fix the          problem is to either delete or temporarily rename the copies          of db.h and libdb.a that you don't want BerkeleyDB to use.	  If you are running Linux, please read the Linux Notes section below.Solaris build fails with "language optional software package not installed"---------------------------------------------------------------------------If you are trying to build this module under Solaris and you get anerror message like this    /usr/ucb/cc: language optional software package not installedit means that Perl cannot find the C compiler on your system. The crypticmessage is just Sun's way of telling you that you haven't bought theirC compiler.When you build a Perl module that needs a C compiler, the Perl buildsystem tries to use the same C compiler that was used to build perlitself. In this case your Perl binary was built with a C compiler thatlived in /usr/ucb.To continue with building this module, you need to get a C compiler,or tell Perl where your C compiler is, if you already have one.Assuming you have now got a C compiler, what you do next will be dependanton what C compiler you have installed. If you have just installed Sun'sC compiler, you shouldn't have to do anything. Just try rebuildingthis module.If you have installed another C compiler, say gcc, you have to tell perlhow to use it instead of /usr/ucb/cc.This set of options seems to work if you want to use gcc. Your mileagemay vary.    perl Makefile.PL CC=gcc CCCDLFLAGS=-fPIC OPTIMIZE=" "    make testIf that doesn't work for you, it's time to make changes to the Makefileby hand. Good luck!Solaris build fails with "gcc: unrecognized option `-KPIC'"-----------------------------------------------------------You are running Solaris and you get an error like this when you try tobuild this Perl module    gcc: unrecognized option `-KPIC'This symptom usually means that you are using a Perl binary that has been

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -