安装:在'PREFIX =〜/ perlmods'之后缺少目标文件操作数

时间:2013-01-26 23:05:05

标签: mysql perl cpan dbd

尝试安装DBD :: mysql。共享主机。使用perlbrew在我的主目录中安装Perl / cpan。这个盒子上没有运行mysql服务器,也不需要。

这是我在安装DBD :: mysql

时得到的输出
DBD-mysql-4.022/TODO
DBD-mysql-4.022/ChangeLog
DBD-mysql-4.022/INSTALL.html
DBD-mysql-4.022/t/
DBD-mysql-4.022/t/41bindparam.t
DBD-mysql-4.022/t/51bind_type_guessing.t
DBD-mysql-4.022/t/80procs.t
DBD-mysql-4.022/t/25lockunlock.t
DBD-mysql-4.022/t/40bindparam.t
DBD-mysql-4.022/t/40nulls.t
DBD-mysql-4.022/t/55utf8.t
DBD-mysql-4.022/t/91errcheck.t
DBD-mysql-4.022/t/41blobs_prepare.t
DBD-mysql-4.022/t/31insertid.t
DBD-mysql-4.022/t/35prepare.t
DBD-mysql-4.022/t/50chopblanks.t
DBD-mysql-4.022/t/42bindparam.t
DBD-mysql-4.022/t/32insert_error.t
DBD-mysql-4.022/t/50commit.t
DBD-mysql-4.022/t/10connect.t
DBD-mysql-4.022/t/86_bug_36972.t
DBD-mysql-4.022/t/40bindparam2.t
DBD-mysql-4.022/t/20createdrop.t
DBD-mysql-4.022/t/40keyinfo.t
DBD-mysql-4.022/t/40server_prepare.t
DBD-mysql-4.022/t/mysql.mtest
DBD-mysql-4.022/t/52comment.t
DBD-mysql-4.022/t/65types.t
DBD-mysql-4.022/t/30insertfetch.t
DBD-mysql-4.022/t/40catalog.t
DBD-mysql-4.022/t/70takeimp.t
DBD-mysql-4.022/t/40types.t
DBD-mysql-4.022/t/75supported_sql.t
DBD-mysql-4.022/t/53comment.t
DBD-mysql-4.022/t/85init_command.t
DBD-mysql-4.022/t/mem_leak.pl
DBD-mysql-4.022/t/40numrows.t
DBD-mysql-4.022/t/76multi_statement.t
DBD-mysql-4.022/t/71impdata.t
DBD-mysql-4.022/t/35limit.t
DBD-mysql-4.022/t/mysql.dbtest
DBD-mysql-4.022/t/00base.t
DBD-mysql-4.022/t/40blobs.t
DBD-mysql-4.022/t/40nulls_prepare.t
DBD-mysql-4.022/t/60leaks.t
DBD-mysql-4.022/t/29warnings.t
DBD-mysql-4.022/t/40server_prepare_error.t
DBD-mysql-4.022/t/40listfields.t
DBD-mysql-4.022/t/lib.pl
DBD-mysql-4.022/dbdimp.c
DBD-mysql-4.022/constants.h
DBD-mysql-4.022/eg/
DBD-mysql-4.022/eg/proc_example3.pl
DBD-mysql-4.022/eg/proc_example2b.pl
DBD-mysql-4.022/eg/issue21946.pl
DBD-mysql-4.022/eg/bug30033pg.pl
DBD-mysql-4.022/eg/proc_example2.pl
DBD-mysql-4.022/eg/decimal_test.pl
DBD-mysql-4.022/eg/proc_example1.pl
DBD-mysql-4.022/eg/prepare_memory_usage.pl
DBD-mysql-4.022/eg/bug21028.pl
DBD-mysql-4.022/eg/proc_example2a.pl
DBD-mysql-4.022/eg/bug14979.pl
DBD-mysql-4.022/eg/proc_example4.pl
DBD-mysql-4.022/eg/bug30033.pl
DBD-mysql-4.022/myld
DBD-mysql-4.022/Makefile.PL
DBD-mysql-4.022/MANIFEST.SKIP
DBD-mysql-4.022/README.OSX
DBD-mysql-4.022/MANIFEST
DBD-mysql-4.022/dbdimp.h
DBD-mysql-4.022/META.yml
CPAN: File::Temp loaded ok (v0.22)
CPAN: Parse::CPAN::Meta loaded ok (v1.4402)
CPAN: CPAN::Meta loaded ok (v2.120630)
Prepending /home/rkltwitter/.cpan/build/DBI-1.623-Wb16cS/blib/arch /home/rkltwitter/.cpan/build/DBI-1.623-Wb16cS/blib/lib /home/rkltwitter/.cpan/build/Class-DBI-v3.0.17-TE00jx/blib/arch /home/rkltwitter/.cpan/build/Class-DBI-v3.0.17-TE00jx/blib/lib /home/rkltwitter/.cpan/build/Class-Data-Inheritable-0.08-6zT5e2/blib/arch /home/rkltwitter/.cpan/build/Class-Data-Inheritable-0.08-6zT5e2/blib/lib /home/rkltwitter/.cpan/build/Class-Trigger-0.14-ojTrtL/blib/arch /home/rkltwitter/.cpan/build/Class-Trigger-0.14-ojTrtL/blib/lib /home/rkltwitter/.cpan/build/Class-Accessor-0.34-I26kqc/blib/arch /home/rkltwitter/.cpan/build/Class-Accessor-0.34-I26kqc/blib/lib to PERL5LIB for 'make'

  CPAN.pm: Building C/CA/CAPTTOFU/DBD-mysql-4.022.tar.gz

Argument "PREFIX=~/perlmods" isn't numeric in alarm at /home/rkltwitter/perl5/perlbrew/perls/perl-5.16.2/lib/5.16.2/CPAN/Distribution.pm line 1945.


PLEASE NOTE:

For 'make test' to run properly, you must ensure that the
database user 'rkltwitter' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.

mysql> grant all privileges on test.* to 'rkltwitter'@'localhost' identified by 's3kr1t';

You can also optionally set the user to run 'make test' with:

perl Makefile.PL --testuser=username

I will use the following settings for compiling and testing:

  cflags        (mysql_config) = -I/usr/include/mysql  -DBIG_JOINS=1  -fno-strict-aliasing   -DUNIV_LINUX -DUNIV_LINUX
  embedded      (mysql_config) =
  ldflags       (mysql_config) = -rdynamic
  libs          (mysql_config) = -L/usr/lib/mysql -lmysqlclient
  mysql_config  (guessed     ) = mysql_config
  nocatchstderr (default     ) = 0
  nofoundrows   (default     ) = 0
  ssl           (guessed     ) = 0
  testdb        (default     ) = test
  testhost      (default     ) =
  testpassword  (default     ) =
  testsocket    (default     ) =
  testuser      (guessed     ) = rkltwitter

To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.

Checking if your kit is complete...
Looks good
Multiple copies of Driver.xst found in: /home/rkltwitter/.cpan/build/DBI-1.623-Wb16cS/blib/arch/auto/DBI/ /home/rkltwitter/perl5/perlbrew/perls/perl-5.16.2/lib/site_perl/5.16.2/x86_64-linux/auto/DBI/ at Makefile.PL line 941.
Using DBI 1.623 (for perl 5.016002 on x86_64-linux) installed in /home/rkltwitter/.cpan/build/DBI-1.623-Wb16cS/blib/arch/auto/DBI/
Writing Makefile for DBD::mysql
Writing MYMETA.yml and MYMETA.json
CPAN: Module::CoreList loaded ok (v2.76)
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
cc -c  -I/home/rkltwitter/.cpan/build/DBI-1.623-Wb16cS/blib/arch/auto/DBI -I/usr/include/mysql  -DBIG_JOINS=1  -fno-strict-aliasing   -DUNIV_LINUX -DUNIV_LINUX -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"4.022\" -DXS_VERSION=\"4.022\" -fPIC "-I/home/rkltwitter/perl5/perlbrew/perls/perl-5.16.2/lib/5.16.2/x86_64-linux/CORE"   dbdimp.c
dbdimp.c: In function ‘mysql_describe’:
dbdimp.c:3617: warning: assignment from incompatible pointer type
/home/rkltwitter/perl5/perlbrew/perls/perl-5.16.2/bin/perl -p -e "s/~DRIVER~/mysql/g" /home/rkltwitter/.cpan/build/DBI-1.623-Wb16cS/blib/arch/auto/DBI/Driver.xst > mysql.xsi
/home/rkltwitter/perl5/perlbrew/perls/perl-5.16.2/bin/perl /home/rkltwitter/perl5/perlbrew/perls/perl-5.16.2/lib/5.16.2/ExtUtils/xsubpp  -typemap /home/rkltwitter/perl5/perlbrew/perls/perl-5.16.2/lib/5.16.2/ExtUtils/typemap  mysql.xs > mysql.xsc && mv mysql.xsc mysql.c
Warning: duplicate function definition 'do' detected in mysql.xs, line 242
Warning: duplicate function definition 'rows' detected in mysql.xs, line 752
cc -c  -I/home/rkltwitter/.cpan/build/DBI-1.623-Wb16cS/blib/arch/auto/DBI -I/usr/include/mysql  -DBIG_JOINS=1  -fno-strict-aliasing   -DUNIV_LINUX -DUNIV_LINUX -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"4.022\" -DXS_VERSION=\"4.022\" -fPIC "-I/home/rkltwitter/perl5/perlbrew/perls/perl-5.16.2/lib/5.16.2/x86_64-linux/CORE"   mysql.c
Running Mkbootstrap for DBD::mysql ()
chmod 644 mysql.bs
rm -f blib/arch/auto/DBD/mysql/mysql.so
LD_RUN_PATH="/usr/lib/../lib" /home/rkltwitter/perl5/perlbrew/perls/perl-5.16.2/bin/perl myld cc  -shared -O2 -L/usr/local/lib -fstack-protector dbdimp.o mysql.o  -o blib/arch/auto/DBD/mysql/mysql.so         \
           -L/usr/lib/mysql -lmysqlclient       \

chmod 755 blib/arch/auto/DBD/mysql/mysql.so
cp mysql.bs blib/arch/auto/DBD/mysql/mysql.bs
chmod 644 blib/arch/auto/DBD/mysql/mysql.bs
Manifying blib/man3/DBD::mysql.3
Manifying blib/man3/DBD::mysql::INSTALL.3
Manifying blib/man3/Bundle::DBD::mysql.3
  CAPTTOFU/DBD-mysql-4.022.tar.gz
  /usr/bin/make PREFIX=~/perlmods PREFIX=~/perlmods -- OK
Prepending /home/rkltwitter/.cpan/build/DBI-1.623-Wb16cS/blib/arch /home/rkltwitter/.cpan/build/DBI-1.623-Wb16cS/blib/lib /home/rkltwitter/.cpan/build/Class-DBI-v3.0.17-TE00jx/blib/arch /home/rkltwitter/.cpan/build/Class-DBI-v3.0.17-TE00jx/blib/lib /home/rkltwitter/.cpan/build/Class-Data-Inheritable-0.08-6zT5e2/blib/arch /home/rkltwitter/.cpan/build/Class-Data-Inheritable-0.08-6zT5e2/blib/lib /home/rkltwitter/.cpan/build/Class-Trigger-0.14-ojTrtL/blib/arch /home/rkltwitter/.cpan/build/Class-Trigger-0.14-ojTrtL/blib/lib /home/rkltwitter/.cpan/build/Class-Accessor-0.34-I26kqc/blib/arch /home/rkltwitter/.cpan/build/Class-Accessor-0.34-I26kqc/blib/lib to PERL5LIB for 'test'
Running make test
PERL_DL_NONLAZY=1 /home/rkltwitter/perl5/perlbrew/perls/perl-5.16.2/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00base.t .................. ok
t/10connect.t ............... skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) Can't continue test
t/20createdrop.t ............ skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/25lockunlock.t ............ skipped: Can't connect to database ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/29warnings.t .............. skipped: ERROR: DBI connect('test','rkltwitter',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at t/29warnings.t line 15.
t/30insertfetch.t ........... skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/31insertid.t .............. skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/32insert_error.t .......... skipped: ERROR: DBI connect('test','rkltwitter',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at t/32insert_error.t line 17.
t/35limit.t ................. skipped: ERROR: DBI connect('test','rkltwitter',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at t/35limit.t line 18.
t/35prepare.t ............... skipped: Can't connect to database ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/40bindparam.t ............. skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/40bindparam2.t ............ skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/40blobs.t ................. skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/40catalog.t ............... "my" variable $info masks earlier declaration in same scope at t/40catalog.t line 288.
t/40catalog.t ............... skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/40keyinfo.t ............... skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/40listfields.t ............ skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/40nulls.t ................. skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/40nulls_prepare.t ......... skipped: Can't connect to database ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/40numrows.t ............... skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/40server_prepare.t ........ skipped: ERROR: DBI connect('test;mysql_server_prepare=1','rkltwitter',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at t/40server_prepare.t line 16.
t/40server_prepare_error.t .. skipped: ERROR: DBI connect('test;mysql_server_prepare=1','rkltwitter',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at t/40server_prepare_error.t line 18.
t/40types.t ................. skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/41bindparam.t ............. skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/41blobs_prepare.t ......... skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/42bindparam.t ............. skipped: ERROR: DBI connect('test','rkltwitter',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at t/42bindparam.t line 13.
t/50chopblanks.t ............ skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/50commit.t ................ skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/51bind_type_guessing.t .... skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/52comment.t ............... skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/53comment.t ............... skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2), DBI connect('test','rkltwitter',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at t/53comment.t line 15.
t/55utf8.t .................. skipped: ERROR: DBI connect('test','rkltwitter',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at t/55utf8.t line 18.
t/60leaks.t ................. skipped: Skip $ENV{SLOW_TESTS} is not set
t/65types.t ................. skipped: ERROR: DBI connect('test','rkltwitter',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at t/65types.t line 13.
t/70takeimp.t ............... skipped: Can't connect to database ERROR: DBI connect('test','rkltwitter',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at t/70takeimp.t line 27.
t/71impdata.t ............... DBI connect('test','rkltwitter',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at t/71impdata.t line 14.
t/71impdata.t ............... skipped: Can't obtain driver handle. Can't continue test
t/75supported_sql.t ......... skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/76multi_statement.t ....... skipped: ERROR: DBI connect('test','rkltwitter',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at t/76multi_statement.t line 15.
t/80procs.t ................. skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/85init_command.t .......... skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). Can't continue test
t/86_bug_36972.t ............ skipped: ERROR: DBI connect('test','rkltwitter',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at t/86_bug_36972.t line 14.
t/91errcheck.t .............. skipped: ERROR: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) Can't continue test
All tests successful.
Files=41, Tests=6,  8 wallclock secs ( 0.38 usr  0.10 sys +  6.53 cusr  1.11 csys =  8.12 CPU)
Result: PASS
  CAPTTOFU/DBD-mysql-4.022.tar.gz
  /usr/bin/make test -- OK
Running make install
Prepending %BUILDDIR%/DBD-mysql-4.022-H2H5qd/blib/arch %BUILDDIR%/DBD-mysql-4.022-H2H5qd/blib/lib %BUILDDIR%/DBI-1.623-Wb16cS/blib/arch %BUILDDIR%/DBI-1.623-Wb16cS/blib/lib %BUILDDIR%/Class-DBI-v3.0.17-TE00jx/blib/arch %BUILDDIR%/Class-DBI-v3.0.17-TE00jx/blib/lib %BUILDDIR%/Class-Data-Inheritable-0.08-6zT5e2/blib/arch %BUILDDIR%/Class-Data-Inheritable-0.08-6zT5e2/blib/lib %BUILDDIR%/Class-Trigger-0.14-ojTrtL/blib/arch %BUILDDIR%/Class-Trigger-0.14-ojTrtL/blib/lib %BUILDDIR%/Class-Accessor-0.34-I26kqc/blib/arch %BUILDDIR%/Class-Accessor-0.34-I26kqc/blib/lib to PERL5LIB; %BUILDDIR%=/home/rkltwitter/.cpan/build for 'install'
install: missing destination file operand after `PREFIX=~/perlmods'
Try `install --help' for more information.
  CAPTTOFU/DBD-mysql-4.022.tar.gz
  PREFIX=~/perlmods install PREFIX=~/perlmods -- NOT OK
Failed during this command:
 CAPTTOFU/DBD-mysql-4.022.tar.gz              : install NO

1 个答案:

答案 0 :(得分:1)

它正在使用的安装命令:

PREFIX=~/perlmods install PREFIX=~/perlmods

您应该使用的安装命令:

/usr/bin/make install.

您的cpan配置搞砸了。它应该看起来像

make               [/usr/bin/make]
make_arg           []
make_install_arg   []
make_install_make_command [/usr/bin/make]
makepl_arg         []
mbuild_arg         []
mbuild_install_arg []
mbuild_install_build_command [./Build]
mbuildpl_arg       []

要修复,请在cpan内使用

o conf make_install_make_command '/usr/bin/make'
o conf make_install_arg ''
o conf mbuild_install_build_command './Build'
o conf mbuild_install_arg ''
(...?)
o conf commit

使用perlbrew时没有理由指定安装位置,而且操作非常错误。