DB_File Error When Installing MovableType

I got ROSS’s email on DB_File Error this morning.

Hi Jian Shuo,

I have seen your instructions for installing Moveable Type on Windows XP and have come across a problem. I have followed the instructions exactly but when I try and install DB_File, I get the error:

PPM> Install DB_File

Install package ‘DB_File?’ (y/N): Y

Installing package ‘DB_File’…

Error installing package ‘DB_File’: Read a PPD for ‘DB_File’, but it is not inte

nded for this build of Perl (MSWin32-x86-multi-thread)

PPM> QUIT

when I run /mt/mt-check.cgi it tells me

DB_File…

Your server does not have DB_File installed. DB_File is

required if you want to use the Berkeley DB/DB_File backend.

Please consult the installation instructions for help in

installing DB_File.

and when I run /mt/mt-load.cgi it says:

Loading initial data into system…

An error occurred while loading data:

Unsupported driver MT::ObjectDriver::DBM: Can’t locate DB_File.pm in @INC (@INC contains: c:\inetpub\wwwroot\mt\extlib c:\inetpub\wwwroot\mt\lib C:/perl/lib C:/perl/site/lib .) at c:\inetpub\wwwroot\mt\lib/MT/ObjectDriver/DBM.pm line 9.

BEGIN failed–compilation aborted at c:\inetpub\wwwroot\mt\lib/MT/ObjectDriver/DBM.pm line 9.

Compilation failed in require at (eval 3) line 1.

BEGIN failed–compilation aborted at (eval 3) line 1.

I was wondering whether you would be able to try and help me?

many thanks

Ross

(United Kingdom)

It is a frequently asked question. I have described the steps to install MovableType in this blog: MovableType Successfully Installed on Windows XP, but it seems the DB_File is the place where most of the problems happen. This can be seen from the threads listed below. I even met the same problem when I worked with my technical professional on ISP side to move my host to another machine.

At that time, I feel lucky that I have posted the steps on the web, so others like Samuel Wan have posted his solution to the page. I used the resource and steps he listed and successfully solved the problem. I’d like to thank Mr. Wan to share the tips and would like to summarize the steps.

Steps to install DB_File on ActivePerl 5.6.0

If you see this error message when installing DB_File

PPM> Install DB_File

Install package ‘DB_File?’ (y/N): Y

Installing package ‘DB_File’…

Error installing package ‘DB_File’: Read a PPD for ‘DB_File’, but it is not inte

nded for this build of Perl (MSWin32-x86-multi-thread)

It means the default repository of perl modules does not exist – this may be caused by the upgrade of the website or the perl module. You need to manually install the DB_File.

The installation should be successful. Please post after this thread if you find it work or does not work.

36 thoughts on “DB_File Error When Installing MovableType

  1. I’ve read your installation of MT on XP … VERY helpful, thank you.

    However, I too am having problems with DB_File install. I tried installing ActivePerl 5.6 and installing the DB_File.ppd locally with no success. I also tried installing ActivePerl 5.8, but there are no DB_File modules available. Any suggestions?

    Thank you in advance,

    T.J. (US)

  2. I followed the directions and had the same error (“…not intended for this build…”). I am running ActiveState 5.6 and PPM 2.1.6.

    Any other ideas?

    Thanks,

    Jim

  3. i got some error infomation:can’t find unicode character property definetion via main->e or e.pl at unicode/IS/e.pl line 0

  4. Hi, thanks for the nice helpfile, but I get another error:

    Error installing package ‘c:\temp\DB-File.ppd’: Could not locate a PPD file for

    package c:\temp\DB-File.ppd

    Ever seen this error and do you know the answer?

    Kind regards,

    Eric

  5. I do not even get that far :/

    ppm install db_file.ppd

    Error: no suitable installation target found for package DB_File.

    Any ideas?

  6. I get the same problem as zheng:

    PPM> install D:\Downloads\Perl\Temp\DB_File.ppd

    Can’t find unicode character property definition via main->e or e.pl at unicode/

    Is/e.pl line 0

    This is Win2000. Everthing else about the ActivePerl installation worked fine. But, I wasted a lot of time messing with 5.8 and am now wasting time with 5.6.1

    The only good thing is to see others suffering at the same time!

    But, please, someone, a solution…

  7. Thank you John!! I stumbled across this blog looking for help (actually a completely unrelated install of Ikonboard) and that tip worked perfectly.

  8. Arrgh. I installed perl5.8 and apache2 on XP-Home, both working. then installed MT into cgi-bin. Got the “Got an error: Unsupported driver MT::ObjectDriver::DBM: Can’t load ‘C:/Perl/lib/auto/DB_File/DB_File.dll’ for module…

    same with mt-load

    thanks to this thread, I ran “perl mt-check.cgi” in the command line and it worked, “Your server has DB_File installed (version 1.806)”

    yeah!, then ran “perl mt-load.cgi” — also worked, set up everything just swell into c:\apache2\db\

    Then, arghh, still the same error when running “http://localhost/cgi-bin/mt.cgi” from browswer. “Got an error: Unsupported driver MT::ObjectDriver::DBM: Can’t load ‘C:/Perl/lib/auto/DB_File/DB_File.dll’ for module…

    running mt-check from command line finds DB_File, running it from browser doesn’t find it…

    help please,

  9. OMG — REBOOT!!!

    well, for those who bang their heads similarly, I rebooted and now it all works out… including mt-check from the browser

    thanks all for the help in this

    sigh

  10. Ok, I have a friend with

    Got an error: Unsupported driver MT::ObjectDriver::DBM: Can’t locate DB_File.pm in @INC (@INC contains: ./extlib ./lib /usr/lib/perl5/5.6.1/i686-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i686-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at lib/MT/ObjectDriver/DBM.pm line 9. BEGIN failed–compilation aborted at lib/MT/ObjectDriver/DBM.pm line 9. Compilation failed in require at (eval 3) line 1. BEGIN failed–compilation aborted at (eval 3) line 1.

    This just started showing up on a long time install, and an upgrade to 2.64 didn’t solve it. This is on a Linux server. Thoughts?

  11. Hi all, Im having similar problems to above. If I run mt-check from a command window it reports DB_File is installed and available. If I run mt-check from the browser it fails to detect db_file.

    I even ran mt-load.cgi from the command window on my server and it installed MT into the directory I specified in mt.cfg

    However running mt-check, mt-load, mt.cgi from the browser (either on the client or server) reports this classic error –

    Got an error: Unsupported driver MT::ObjectDriver::DBM: Can’t locate DB_File.pm in @INC (@INC contains: c:/oracle/ora81/apache/apache/htdocs/mt/extlib c:/oracle/ora81/apache/apache/htdocs/mt/lib c:/oracle/ora81/Apache/Apache/ActivePerl/Perl/lib c:/oracle/ora81/Apache/Apache/ActivePerl/Perl/site/lib .) at c:/oracle/ora81/apache/apache/htdocs/mt/lib/MT/ObjectDriver/DBM.pm line 9. BEGIN failed–compilation aborted at c:/oracle/ora81/apache/apache/htdocs/mt/lib/MT/ObjectDriver/DBM.pm line 9. Compilation failed in require at (eval 3) line 1. BEGIN failed–compilation aborted at (eval 3) line 1.

    *******

    I have rebooted the server (and client ;-) seems to make no difference. Any clues thoughts or suggestions would be most appreciated.

    Cheers

    Steve

    By the way Wangjianshuo, very good helpful information – cheers

  12. Hi Steve,

    First of all, I am not a Perl expert. I just want to try to give some hint based on my experience.

    For Perl to find DB_File.pm, the file must resides in the INC path in your system. It seems that the @INC enviorment for your web server and for the command line are different. It seems that the @INC reported in the error message does not seems to have the module. Why not try the follow steps:

    Locate the DB_File.pm in your system and copy it to one of the folder that is already in the webserver’s @INC path, for example: c:/oracle/ora81/apache/apache/htdocs/mt/extlib

    There is no garrentee that this will work – just give it a try. Anyone read this article can help Steve on this wired problem?

    P.S. I am happy that you told me the page is helpful. :-)

  13. Now I am really confused.

    After spending a few days trying to get Berkley DB_file working with MT I gave up and thought – ok, my server I’ll just install mysql and use that instead.

    Installed mysql, installed the DBI and DBD interfaces. Created a database.

    EXACTLY the same problem. mt-check from command line finds mysql and reports is installed.

    mt-check from the browser fails. So if I try to run mt-load I get the

    Unsupported driver MT::ObjectDriver::DBI::mysql: Can’t locate DBI.pm in @INC …

    error

    This is so bizzare. Do you think this could be an apache issue?

    Steve

  14. It seems it is not the problem of whether the DB is installed or not. The problem is the MovableType is not aware of the existance of the installed database. It must be the @INC parameters. It does not includes the path your DB system was installed in.

  15. The error I reported was caused by a server owner moving the site to a new server, which did not have the required modules for continued MT Berkley install.

  16. I installed DB_File just fine. But now when I run http://localhost/cgi-bin/mt/mt.cgi I get the following error.

    Got an error: Unsupported driver MT::ObjectDriver::DBM: Can’t locate loadable object for module DB_File in @INC (@INC contains: C:/Program Files/Apache Group/Apache2/cgi-bin/mt/extlib C:/Program Files/Apache Group/Apache2/cgi-bin/mt/lib C:/Perl/lib C:/Perl/site/lib .) at C:/Program Files/Apache Group/Apache2/cgi-bin/mt/lib/MT/ObjectDriver/DBM.pm line 9 Compilation failed in require at C:/Program Files/Apache Group/Apache2/cgi-bin/mt/lib/MT/ObjectDriver/DBM.pm line 9. BEGIN failed–compilation aborted at C:/Program Files/Apache Group/Apache2/cgi-bin/mt/lib/MT/ObjectDriver/DBM.pm line 9. Compilation failed in require at (eval 3) line 1. BEGIN failed–compilation aborted at (eval 3) line 1.

    Anyone know what this means? I tried installing a older version of DB_File (ver 1.72) but could not find a precompiled version (a .ppm version). Im a bit over my head with this, so if anyone could straighten me out, it would be much appreciated!

  17. I get the same

    Got an error: Unsupported driver MT::ObjectDriver::DBM: Can’t locate DB_File.pm in @INC (@INC contains: ./extlib ./lib /usr/lib/perl5/5.6.1/i686-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i686-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at lib/MT/ObjectDriver/DBM.pm line 9. BEGIN failed–compilation aborted at lib/MT/ObjectDriver/DBM.pm line 9. Compilation failed in require at (eval 3) line 1. BEGIN failed–compilation aborted at (eval 3) line 1.

    with the default way and MySQL. Ive tried everything!!!

  18. Hi!!

    After read all instructions, manual and tips, I still having problems installing MT in my localhost (win2k/apache/mySQl/ActivePerl 5.8 ) I’m having the same problem but in the DBI.pm for mySQL, I did a check for the packages in PPM and it show that DBI and DBD are already installed, I’m really frustrated about this issue in the MT installation, any idea where can I found a “MT Installation for “extra-dummies” ?

    Regards

    Jahir

  19. hi Jian Shuo,

    i e-mailed my hosting company and they said they made my domain a separate application, so i had to ask them to install DB_FILE for me on the server, and it worked!

  20. I have tried to install several Perl moduels on my machine (it runs Win98). I’m using Activeperl, v5.6.0 built for MSWin32-x86-multi-thread, and I have downloaded several modules from ActiveState.

    I have tried to install these packages using ‘PPM install’ and by hand. Each time the install succeeds, but when I run a perl program to test the install, I get a message that a library file is not available. I thought that the problem might be with the particular madule I was trying to install so I tried it with a couple of others and got similar messages.

    One of the modules I am trying to install is DB_File. After installing, when I run a test program I get the following message:

    Can’t load ‘C:/Perl/lib/auto/DB_File/DB_File.dll’ for module DB_File

    The files DB_File.dll, DB_File.lib, DB_File.bs, and DB_File.exp all exist in the given directory.

    Has anyone run across a problem like this before and how did you fix it?

  21. Don’t know if any of you guys have tied this, but i have finally had success in instaling DB_File using the following method:

    After installing the latest ActivePerl (5.8) I went ran the “Perl Package Manager” from the program start menu.

    The program should open up a DOS screen.

    From here you can type help for further commands.

    Type: search DB_File

    This will search the web for DB_File

    Afer it brigns up a list, install the second “DB_File” that is listed (as I got two packages of the same name being displayed) This was item 7 on my list.

    So what you type is: install 7

    This should take care of everything else for you!

    I’m sorry if this is what was being discussed in the threads above, it jsut didn’t make sense to me until I found out for myself. Hope this explanation helps others.

  22. does anyone know why i get this error when i try and run mt-load.cgi:

    Content-Type: text/html

    Loading initial data into system…

    Loading weblog…

    An error occurred while loading data:

    Tie ‘db\blog.db’ failed: Invalid argument

    thanks,

    jen

    (mikeandjen@filipak.com)

  23. Shuo Wang, thanks for your indications., I wa sable to locate a pack, xampp, and isntall basically everything up to and including a mysql based MT. It gave me some trouble with the perl packages it was expecting, but after a few runs around the block it went perfect.

    Now, for the MT 3.0

  24. I’m having the same problem as Jen, with the invalid argument, but I have no idea what it is, and i’ve tried many different things. from giving everyone write access to that directory to just the internet user. This is on a win2k3 server by the way.

  25. I have just installed Movable type and when i try to run mt.cgi it gives an error:-

    Got an error: Unsupported driver MT::ObjectDriver::DBM: Can’t locate DB_File.pm in @INC (@INC contains: d:\inetpub\wwwroot\MT\extlib d:\inetpub\wwwroot\MT\lib C:/devtools/perl/lib C:/devtools/perl/site/lib .) at d:\inetpub\wwwroot\MT\lib/MT/ObjectDriver/DBM.pm line 9. BEGIN failed–compilation aborted at d:\inetpub\wwwroot\MT\lib/MT/ObjectDriver/DBM.pm line 9. Compilation failed in require at (eval 3) line 1. BEGIN failed–compilation aborted at (eval 3) line 1.

    Can anybody help me?

  26. I have just installed Movable type and when i try to run mt.cgi it gives an error:-

    Got an error: Unsupported driver MT::ObjectDriver::DBM: Can’t locate DB_File.pm in @INC (@INC contains: d:\inetpub\wwwroot\MT\extlib d:\inetpub\wwwroot\MT\lib C:/devtools/perl/lib C:/devtools/perl/site/lib .) at d:\inetpub\wwwroot\MT\lib/MT/ObjectDriver/DBM.pm line 9. BEGIN failed–compilation aborted at d:\inetpub\wwwroot\MT\lib/MT/ObjectDriver/DBM.pm line 9. Compilation failed in require at (eval 3) line 1. BEGIN failed–compilation aborted at (eval 3) line 1.

    Can anybody help me?

  27. I keep getting an error when I try to renuild: Writing to ‘ c:\program files\easyphp1-7\www\mt\first_weblog\index.html.new’ failed: Opening local file ‘ c:\program files\easyphp1-7\www\mt\first_weblog\index.html.new’ failed: Invalid argument

    And below that it says

    Use of uninitialized value in substitution iterator at c:\PROGRA~1\EASYPH~1\cgi-bin\lib/MT/Util.pm line 146.

    Um, what? ;________________________________;

  28. Hey Everyone,

    Many thanks to Jian for setting up this page. I’ve been struggling with the problem of mt.cgi giving the error:

    Unsupported driver MT::ObjectDriver::DBM: Can’t locate DB_File.pm in @INC… bla bla bla

    I solved the problem by simply installing an older version of ActivePerl: 5.6.1.638. Hope that helps anyone still struggling.

    Matt.

  29. i have one problem

    Bad ObjectDriver config: Your DataSource directory (‘./db’) does not exist.

    wat can i do?

    thanks

  30. Thank you so much for your DBI installation instructions and link to the ActiveState package downloads. I have been struggling with installing DBI for a day and a half! I followed your instructions and it worked like dream. Thank you again!

    Clare

  31. After I installed, I am getting this error while executing the perl program. Actually I am connecting to data base. How to connect the SQL server database using perl?

    Can’t locate loadable object for module DBI in @INC (@INC contains: C:/Perl/lib

    C:/Perl/site/lib .) at C:/Perl/site/lib/DBI.pm line 265

    BEGIN failed–compilation aborted at C:/Perl/site/lib/DBI.pm line 265.

    Compilation failed in require at abc.pl line 1.

    BEGIN failed–compilation aborted at abc.pl line 1.

Leave a Reply

Your email address will not be published. Required fields are marked *