[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"Can't locate Module/Build.pm in @INC" solution



The the person who, like me, was getting this error when trying to run 
"perl Build.pl": I have found a solution.

You must use cpan to install the "Build" package.  It does not say this in 
the README.debian file where it lists the other Debian cpan targets, and 
the dists/debian/ file about cpan is not clear on what one is to do (at 
least, it is not clear to an infrequent cpan user).

So:

cpan
install Build
q

should do the trick for you.  If you're anything like me however, you'll 
get a bunch of errors from cpan while it does the install, resulting in a 
failed make.
This is not particularly ideal (cpan output attached), but the resulting 
dubious installation does work enough to let you run the Build.pl script.

I hate to say it, but it is for reasons such as this, that SQL-Ledger has 
all of the redundant internal constructs that it does.  No, that isn't a 
good idea either, but PERL packaging is still a bit stoneage when you put 
it against something like apt.

Regards,

Luke
..hidden..:/usr/local/ledgersmb# cpan
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.7602)
ReadLine support available (try 'install Bundle::CPAN')

cpan> install Build
CPAN: Storable loaded ok
Going to read /var/cache/cpan/Metadata
  Database was generated on Wed, 23 Jan 2008 01:31:01 GMT
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
  ftp://cpan.llarian.net/pub/CPAN/authors/01mailrc.txt.gz
Going to read /var/cache/cpan/sources/authors/01mailrc.txt.gz
CPAN: Compress::Zlib loaded ok
Fetching with LWP:
  ftp://cpan.llarian.net/pub/CPAN/modules/02packages.details.txt.gz
Going to read /var/cache/cpan/sources/modules/02packages.details.txt.gz
  Database was generated on Thu, 24 Jan 2008 01:30:57 GMT

  There's a new CPAN.pm version (v1.9205) available!
  [Current version is v1.7602]
  You might want to try
    install Bundle::CPAN
    reload cpan
  without quitting the current session. It should be a seamless upgrade
  while we are running...

Fetching with LWP:
  ftp://cpan.llarian.net/pub/CPAN/modules/03modlist.data.gz
Going to read /var/cache/cpan/sources/modules/03modlist.data.gz
Going to write /var/cache/cpan/Metadata
Running install for module Build
Running make for A/AU/AUTRIJUS/Acme-Hello-0.02.tar.gz
Fetching with LWP:
  ftp://cpan.llarian.net/pub/CPAN/authors/id/A/AU/AUTRIJUS/Acme-Hello-0.02.tar.gz
CPAN: Digest::MD5 loaded ok
Fetching with LWP:
  ftp://cpan.llarian.net/pub/CPAN/authors/id/A/AU/AUTRIJUS/CHECKSUMS
Checksum for /var/cache/cpan/sources/authors/id/A/AU/AUTRIJUS/Acme-Hello-0.02.tar.gz ok
Scanning cache /var/cache/cpan/build for sizes
Acme-Hello-0.02/
Acme-Hello-0.02/lib/
Acme-Hello-0.02/lib/Acme/
Acme-Hello-0.02/lib/Acme/Hello/
Acme-Hello-0.02/lib/Acme/Hello/I18N/
Acme-Hello-0.02/lib/Acme/Hello/I18N/ko.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/gl.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/id.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/hr.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/et.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/uk.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/ja.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/nn.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/nl.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/nb.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/el.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/sk.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/da.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/pl.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/fi.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/ca.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/pt.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/sl.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/sv.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/eo.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/de.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/es.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/it.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/zh_CN.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/fr.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/de_DE.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/en.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/hu.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/lv.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/ru.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/pt_BR.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/zh_TW.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/tr.po
Acme-Hello-0.02/lib/Acme/Hello/I18N/he.po
Acme-Hello-0.02/lib/Acme/Hello/I18N.pm
Acme-Hello-0.02/lib/Acme/Hello.pm
Acme-Hello-0.02/Changes
Acme-Hello-0.02/MANIFEST
Acme-Hello-0.02/META.yml
Acme-Hello-0.02/t/
Acme-Hello-0.02/t/0-signature.t
Acme-Hello-0.02/t/1-basic.t
Acme-Hello-0.02/MANIFEST.SKIP
Acme-Hello-0.02/inc/
Acme-Hello-0.02/inc/Build.pm
Acme-Hello-0.02/INSTALL
Acme-Hello-0.02/Build.PL
Acme-Hello-0.02/Makefile.PL
Acme-Hello-0.02/README
Acme-Hello-0.02/SIGNATURE

  CPAN.pm: Going to build A/AU/AUTRIJUS/Acme-Hello-0.02.tar.gz

This module requires Module::Build to install itself.
  Install Module::Build from CPAN? [y] y
CPAN: Storable loaded ok
Going to read /var/cache/cpan/Metadata
  Database was generated on Thu, 24 Jan 2008 01:30:57 GMT
Running install for module Module::Build::Compat
Running make for K/KW/KWILLIAMS/Module-Build-0.2808.tar.gz
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
  ftp://cpan.llarian.net/pub/CPAN/authors/id/K/KW/KWILLIAMS/Module-Build-0.2808.tar.gz
CPAN: Digest::MD5 loaded ok
Fetching with LWP:
  ftp://cpan.llarian.net/pub/CPAN/authors/id/K/KW/KWILLIAMS/CHECKSUMS
CPAN: Compress::Zlib loaded ok
Checksum for /var/cache/cpan/sources/authors/id/K/KW/KWILLIAMS/Module-Build-0.2808.tar.gz ok
Scanning cache /var/cache/cpan/build for sizes
Module-Build-0.2808/
Module-Build-0.2808/Build.PL
Module-Build-0.2808/Changes
Module-Build-0.2808/contrib/
Module-Build-0.2808/contrib/bash_completion.module-build
Module-Build-0.2808/INSTALL
Module-Build-0.2808/lib/
Module-Build-0.2808/lib/Module/
Module-Build-0.2808/lib/Module/Build/
Module-Build-0.2808/lib/Module/Build/API.pod
Module-Build-0.2808/lib/Module/Build/Authoring.pod
Module-Build-0.2808/lib/Module/Build/Base.pm
Module-Build-0.2808/lib/Module/Build/Compat.pm
Module-Build-0.2808/lib/Module/Build/Config.pm
Module-Build-0.2808/lib/Module/Build/Cookbook.pm
Module-Build-0.2808/lib/Module/Build/ModuleInfo.pm
Module-Build-0.2808/lib/Module/Build/Notes.pm
Module-Build-0.2808/lib/Module/Build/Platform/
Module-Build-0.2808/lib/Module/Build/Platform/aix.pm
Module-Build-0.2808/lib/Module/Build/Platform/Amiga.pm
Module-Build-0.2808/lib/Module/Build/Platform/cygwin.pm
Module-Build-0.2808/lib/Module/Build/Platform/darwin.pm
Module-Build-0.2808/lib/Module/Build/Platform/Default.pm
Module-Build-0.2808/lib/Module/Build/Platform/EBCDIC.pm
Module-Build-0.2808/lib/Module/Build/Platform/MacOS.pm
Module-Build-0.2808/lib/Module/Build/Platform/MPEiX.pm
Module-Build-0.2808/lib/Module/Build/Platform/os2.pm
Module-Build-0.2808/lib/Module/Build/Platform/RiscOS.pm
Module-Build-0.2808/lib/Module/Build/Platform/Unix.pm
Module-Build-0.2808/lib/Module/Build/Platform/VMS.pm
Module-Build-0.2808/lib/Module/Build/Platform/VOS.pm
Module-Build-0.2808/lib/Module/Build/Platform/Windows.pm
Module-Build-0.2808/lib/Module/Build/PodParser.pm
Module-Build-0.2808/lib/Module/Build/PPMMaker.pm
Module-Build-0.2808/lib/Module/Build/Version.pm
Module-Build-0.2808/lib/Module/Build/YAML.pm
Module-Build-0.2808/lib/Module/Build.pm
Module-Build-0.2808/Makefile.PL
Module-Build-0.2808/MANIFEST
Module-Build-0.2808/META.yml
Module-Build-0.2808/README
Module-Build-0.2808/scripts/
Module-Build-0.2808/scripts/config_data
Module-Build-0.2808/SIGNATURE
Module-Build-0.2808/t/
Module-Build-0.2808/t/basic.t
Module-Build-0.2808/t/bundled/
Module-Build-0.2808/t/bundled/Test/
Module-Build-0.2808/t/bundled/Test/Builder.pm
Module-Build-0.2808/t/bundled/Test/More.pm
Module-Build-0.2808/t/bundled/Test/Simple.pm
Module-Build-0.2808/t/bundled/Tie/
Module-Build-0.2808/t/bundled/Tie/CPHash.pm
Module-Build-0.2808/t/compat.t
Module-Build-0.2808/t/destinations.t
Module-Build-0.2808/t/ext.t
Module-Build-0.2808/t/extend.t
Module-Build-0.2808/t/files.t
Module-Build-0.2808/t/help.t
Module-Build-0.2808/t/install.t
Module-Build-0.2808/t/lib/
Module-Build-0.2808/t/lib/DistGen.pm
Module-Build-0.2808/t/lib/MBTest.pm
Module-Build-0.2808/t/manifypods.t
Module-Build-0.2808/t/mbyaml.t
Module-Build-0.2808/t/metadata.t
Module-Build-0.2808/t/metadata2.t
Module-Build-0.2808/t/moduleinfo.t
Module-Build-0.2808/t/new_from_context.t
Module-Build-0.2808/t/notes.t
Module-Build-0.2808/t/par.t
Module-Build-0.2808/t/parents.t
Module-Build-0.2808/t/pod_parser.t
Module-Build-0.2808/t/ppm.t
Module-Build-0.2808/t/runthrough.t
Module-Build-0.2808/t/signature.t
Module-Build-0.2808/t/test_type.t
Module-Build-0.2808/t/test_types.t
Module-Build-0.2808/t/tilde.t
Module-Build-0.2808/t/versions.t
Module-Build-0.2808/t/xs.t

  CPAN.pm: Going to build K/KW/KWILLIAMS/Module-Build-0.2808.tar.gz

# running Build.PL installdirs=site
/usr/bin/perl Build.PL installdirs=site
Checking whether your kit is complete...
Looks good

Checking prerequisites...
 * Optional prerequisite Module::Signature is not installed
 * Optional prerequisite ExtUtils::ParseXS is not installed
 * Optional prerequisite Archive::Tar is not installed
 * Optional prerequisite Pod::Readme is not installed
 * Optional prerequisite ExtUtils::CBuilder is not installed

ERRORS/WARNINGS FOUND IN PREREQUISITES.  You may wish to install the versions
of the modules indicated above before proceeding with this installation

Checking features:
  manpage_support....enabled
  YAML_support.......disabled
    - YAML is not installed
  C_support..........disabled
    - ExtUtils::CBuilder is not installed
    * Optional prerequisite ExtUtils::ParseXS is not installed
  HTML_support.......enabled

Creating new 'Build' script for 'Module-Build' version '0.2808'
/usr/bin/perl Build --makefile_env_macros 1
Copying lib/Module/Build/Version.pm -> blib/lib/Module/Build/Version.pm
Copying lib/Module/Build/Platform/darwin.pm -> blib/lib/Module/Build/Platform/darwin.pm
Copying lib/Module/Build/Platform/MacOS.pm -> blib/lib/Module/Build/Platform/MacOS.pm
Copying lib/Module/Build/Notes.pm -> blib/lib/Module/Build/Notes.pm
Copying lib/Module/Build/Compat.pm -> blib/lib/Module/Build/Compat.pm
Copying lib/Module/Build/Platform/RiscOS.pm -> blib/lib/Module/Build/Platform/RiscOS.pm
Copying lib/Module/Build/PodParser.pm -> blib/lib/Module/Build/PodParser.pm
Copying lib/Module/Build/Platform/VOS.pm -> blib/lib/Module/Build/Platform/VOS.pm
Copying lib/Module/Build/Platform/Windows.pm -> blib/lib/Module/Build/Platform/Windows.pm
Copying lib/Module/Build/Platform/Unix.pm -> blib/lib/Module/Build/Platform/Unix.pm
Copying lib/Module/Build/ModuleInfo.pm -> blib/lib/Module/Build/ModuleInfo.pm
Copying lib/Module/Build/Platform/Amiga.pm -> blib/lib/Module/Build/Platform/Amiga.pm
Copying lib/Module/Build/Config.pm -> blib/lib/Module/Build/Config.pm
Copying lib/Module/Build/Base.pm -> blib/lib/Module/Build/Base.pm
Copying lib/Module/Build/Platform/os2.pm -> blib/lib/Module/Build/Platform/os2.pm
Copying lib/Module/Build/Platform/cygwin.pm -> blib/lib/Module/Build/Platform/cygwin.pm
Copying lib/Module/Build/Platform/MPEiX.pm -> blib/lib/Module/Build/Platform/MPEiX.pm
Copying lib/Module/Build/Platform/VMS.pm -> blib/lib/Module/Build/Platform/VMS.pm
Copying lib/Module/Build/Platform/EBCDIC.pm -> blib/lib/Module/Build/Platform/EBCDIC.pm
Copying lib/Module/Build.pm -> blib/lib/Module/Build.pm
Copying lib/Module/Build/PPMMaker.pm -> blib/lib/Module/Build/PPMMaker.pm
Copying lib/Module/Build/Platform/aix.pm -> blib/lib/Module/Build/Platform/aix.pm
Copying lib/Module/Build/Cookbook.pm -> blib/lib/Module/Build/Cookbook.pm
Copying lib/Module/Build/Platform/Default.pm -> blib/lib/Module/Build/Platform/Default.pm
Copying lib/Module/Build/YAML.pm -> blib/lib/Module/Build/YAML.pm
Copying lib/Module/Build/Authoring.pod -> blib/lib/Module/Build/Authoring.pod
Copying lib/Module/Build/API.pod -> blib/lib/Module/Build/API.pod
Copying scripts/config_data -> blib/script/config_data
Deleting blib/script/config_data.bak
Writing config notes to blib/lib/Module/Build/ConfigData.pm
Manifying blib/script/config_data -> blib/bindoc/config_data.1p
Manifying blib/lib/Module/Build/Platform/Unix.pm -> blib/libdoc/Module::Build::Platform::Unix.3pm
Manifying blib/lib/Module/Build/Platform/EBCDIC.pm -> blib/libdoc/Module::Build::Platform::EBCDIC.3pm
Manifying blib/lib/Module/Build/Platform/MacOS.pm -> blib/libdoc/Module::Build::Platform::MacOS.3pm
Manifying blib/lib/Module/Build.pm -> blib/libdoc/Module::Build.3pm
Manifying blib/lib/Module/Build/Platform/Amiga.pm -> blib/libdoc/Module::Build::Platform::Amiga.3pm
Manifying blib/lib/Module/Build/ConfigData.pm -> blib/libdoc/Module::Build::ConfigData.3pm
Manifying blib/lib/Module/Build/Platform/cygwin.pm -> blib/libdoc/Module::Build::Platform::cygwin.3pm
Manifying blib/lib/Module/Build/Notes.pm -> blib/libdoc/Module::Build::Notes.3pm
Manifying blib/lib/Module/Build/YAML.pm -> blib/libdoc/Module::Build::YAML.3pm
Manifying blib/lib/Module/Build/ModuleInfo.pm -> blib/libdoc/Module::Build::ModuleInfo.3pm
Manifying blib/lib/Module/Build/Platform/MPEiX.pm -> blib/libdoc/Module::Build::Platform::MPEiX.3pm
Manifying blib/lib/Module/Build/PPMMaker.pm -> blib/libdoc/Module::Build::PPMMaker.3pm
Manifying blib/lib/Module/Build/Platform/Windows.pm -> blib/libdoc/Module::Build::Platform::Windows.3pm
Manifying blib/lib/Module/Build/Platform/VOS.pm -> blib/libdoc/Module::Build::Platform::VOS.3pm
Manifying blib/lib/Module/Build/Platform/RiscOS.pm -> blib/libdoc/Module::Build::Platform::RiscOS.3pm
Manifying blib/lib/Module/Build/API.pod -> blib/libdoc/Module::Build::API.3pm
Manifying blib/lib/Module/Build/Platform/Default.pm -> blib/libdoc/Module::Build::Platform::Default.3pm
Manifying blib/lib/Module/Build/Cookbook.pm -> blib/libdoc/Module::Build::Cookbook.3pm
Manifying blib/lib/Module/Build/Platform/aix.pm -> blib/libdoc/Module::Build::Platform::aix.3pm
Manifying blib/lib/Module/Build/Platform/darwin.pm -> blib/libdoc/Module::Build::Platform::darwin.3pm
Manifying blib/lib/Module/Build/Platform/os2.pm -> blib/libdoc/Module::Build::Platform::os2.3pm
Manifying blib/lib/Module/Build/Platform/VMS.pm -> blib/libdoc/Module::Build::Platform::VMS.3pm
Manifying blib/lib/Module/Build/Base.pm -> blib/libdoc/Module::Build::Base.3pm
Manifying blib/lib/Module/Build/Authoring.pod -> blib/libdoc/Module::Build::Authoring.3pm
Manifying blib/lib/Module/Build/Compat.pm -> blib/libdoc/Module::Build::Compat.3pm
  /usr/bin/make  -- OK
Running make test
/usr/bin/perl Build --makefile_env_macros 1 test
t/basic...............ok
t/compat..............ok
t/destinations........

..hidden..:~$ sudo /bin/bash
Password:
..hidden..:~# cd /usr/local/ledgersmb/
..hidden..:/usr/local/ledgersmb# clear





















..hidden..:/usr/local/ledgersmb# perl Build.PL
Checking prerequisites...
Looks good

Creating new 'Build' script for 'LedgerSMB' version '1.2.10'
..hidden..:/usr/local/ledgersmb#
..hidden..:/usr/local/ledgersmb#


















# so you can verify the integrity of this distribution.
t/0-signature....ok
        1/1 skipped: - Module::Signature not installed
t/1-basic........Use of uninitialized value in pattern match (m//) at /usr/share/perl/5.8/I18N/LangTags.pm line 398.
Use of uninitialized value in concatenation (.) or string at /var/cache/cpan/build/Acme-Hello-0.02/blib/lib/Acme/Hello.pm line 38.
Use of uninitialized value in pattern match (m//) at /usr/share/perl/5.8/I18N/LangTags.pm line 398.
Use of uninitialized value in concatenation (.) or string at /var/cache/cpan/build/Acme-Hello-0.02/blib/lib/Acme/Hello.pm line 38.
t/1-basic........FAILED tests 2-3
        Failed 2/3 tests, 33.33% okay
Failed Test Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/1-basic.t                3    2  66.67%  2-3
1 subtest skipped.
Failed 1/2 test scripts, 50.00% okay. 2/4 subtests failed, 50.00% okay.
make: *** [test] Error 255
  /usr/bin/make test -- NOT OK
Running make install
  make test had returned bad status, won't install without force