Perl - 安装DateTime :: Astro失败..我从哪里开始?

时间:2014-08-22 23:45:07

标签: perl datetime

由于我使用过perl,但是最近我正在深入研究一个使用DateTime :: Astro的已建立的perl项目。即使使用--force,我一直在尝试安装模块并失败。我尝试了3种不同的方式,不知道从哪里开始:

perl -MCPAN -e shell错误

....
CPAN: File::Temp loaded ok (v0.2304)
CPAN: Parse::CPAN::Meta loaded ok (v1.4414)
CPAN: CPAN::Meta loaded ok (v2.142060)
CPAN: Module::CoreList loaded ok (v5.021003)
Configuring D/DM/DMAKI/DateTime-Astro-1.00.tar.gz with Makefile.PL
Cannot determine perl version info from lib/DateTime/Astro.pm
Writing ppport.h
Checking if your kit is complete...
Looks good
Only one of PREFIX or INSTALL_BASE can be given.  Not both.
Warning: No success on command[/usr/bin/perl Makefile.PL PREFIX=~/lib/perl5]
  DMAKI/DateTime-Astro-1.00.tar.gz
  /usr/bin/perl Makefile.PL PREFIX=~/lib/perl5 -- NOT OK
Failed during this command:
 DMAKI/DateTime-Astro-1.00.tar.gz             : writemakefile NO '/usr/bin/perl Makefile.PL PREFIX=~/lib/perl5' returned status 6400

CPAN错误

Checking if your kit is complete...
Looks good
Only one of PREFIX or INSTALL_BASE can be given.  Not both.
Warning: No success on command[/usr/bin/perl Makefile.PL PREFIX=~/lib/perl5]
  DMAKI/DateTime-Astro-1.00.tar.gz
  /usr/bin/perl Makefile.PL PREFIX=~/lib/perl5 -- NOT OK

CPANM错误

cpanm (App::cpanminus) 1.7004 on perl 5.010001 built for x86_64-linux-thread-multi
Work directory is /home/me/.cpanm/work/1408749993.1699
You have make /usr/bin/make
You have LWP 6.08
You have /bin/tar: tar (GNU tar) 1.23
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Checking if you have ExtUtils::MakeMaker 6.31 ... Yes (6.98)
Checking if you have ExtUtils::Install 1.46 ... Yes (1.68)
Searching DateTime::Astro on cpanmetadb ...
--> Working on DateTime::Astro
Fetching http://www.cpan.org/authors/id/D/DM/DMAKI/DateTime-Astro-1.00.tar.gz
-> OK
Unpacking DateTime-Astro-1.00.tar.gz
Entering DateTime-Astro-1.00
Checking configure dependencies from META.yml
Checking if you have ExtUtils::MakeMaker 6.36 ... Yes (6.98)
Checking if you have ExtUtils::ParseXS 2.21 ... Yes (3.24)
Checking if you have Devel::PPPort 3.19 ... Yes (3.24)
Configuring DateTime-Astro-1.00
Running Makefile.PL
Cannot determine perl version info from lib/DateTime/Astro.pm
Writing ppport.h
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for DateTime::Astro
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have DateTime 0 ... Yes (1.10)
Checking if you have DateTime::Set 0 ... Yes (0.3400)
Checking if you have XSLoader 0.02 ... Yes (0.16)
Checking if you have ExtUtils::MakeMaker 6.36 ... Yes (6.98)
Checking if you have ExtUtils::ParseXS 2.21 ... Yes (3.24)
Checking if you have Devel::PPPort 3.19 ... Yes (3.24)
Checking if you have Exporter 5.57 ... Yes (5.70)
Building and testing DateTime-Astro-1.00
cp lib/DateTime/Event/SolarTerm.pm blib/lib/DateTime/Event/SolarTerm.pm
cp lib/DateTime/AstroXS.pm blib/lib/DateTime/AstroXS.pm
cp lib/DateTime/AstroPP.pm blib/lib/DateTime/AstroPP.pm
cp lib/DateTime/Astro.pm blib/lib/DateTime/Astro.pm
Running Mkbootstrap for DateTime::Astro ()
chmod 644 Astro.bs
/usr/bin/perl "-Iinc" /home/me/perl5/lib/perl5/ExtUtils/xsubpp  -typemap /usr/share/perl5/ExtUtils/typemap  xs/dt_astro.xs > xs/dt_astro.xsc && mv xs/dt_astro.xsc xs/dt_astro.c
gcc -c  "-I." "-I." -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wextra -Wdeclaration-after-statement -Wc++-compat -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic   -DVERSION=\"1.00\" -DXS_VERSION=\"1.00\" -o xs/dt_astro.o -fPIC "-I/usr/lib64/perl5/CORE"  -DUSE_PPPORT xs/dt_astro.c
In file included from xs/dt_astro.h:8,
                 from xs/dt_astro.xs:1:
./ppport.h:6060:1: warning: "MUTABLE_PTR" redefined
In file included from /usr/lib64/perl5/CORE/perl.h:2424,
                 from xs/dt_astro.h:5,
                 from xs/dt_astro.xs:1:
/usr/lib64/perl5/CORE/handy.h:63:1: warning: this is the location of the previous definition
In file included from xs/dt_astro.xs:1:
xs/dt_astro.h:9:18: error: mpfr.h: No such file or directory
xs/dt_astro.xs:5: error: expected specifier-qualifier-list before ‘mpfr_t’
In file included from xs/dt_astro.xs:8:
xs/dt_astro_common.inc:7: error: expected ‘)’ before ‘*’ token
xs/dt_astro_common.inc:36: error: expected ‘)’ before ‘*’ token
xs/dt_astro_common.inc:68: error: expected ‘)’ before ‘*’ token
xs/dt_astro_common.inc:86: error: expected ‘)’ before ‘*’ token
xs/dt_astro_common.inc:107: error: expected ‘)’ before ‘*’ token
xs/dt_astro_common.inc:128: error: expected ‘)’ before ‘*’ token
xs/dt_astro_common.inc:152: error: expected ‘)’ before ‘*’ token
xs/dt_astro_common.inc:230: error: expected ‘)’ before ‘*’ token
xs/dt_astro_common.inc:246: error: expected ‘)’ before ‘*’ token
xs/dt_astro_common.inc:258: error: expected ‘)’ before ‘*’ token
xs/dt_astro_common.inc:284: error: expected ‘)’ before ‘*’ token
xs/dt_astro_common.inc:317: error: expected ‘)’ before ‘*’ token
xs/dt_astro_common.inc:338: error: expected ‘)’ before ‘*’ token
xs/dt_astro_common.inc:357: error: expected ‘)’ before ‘*’ token
xs/dt_astro_common.inc:380: error: expected ‘)’ before ‘*’ token
xs/dt_astro_common.inc:408: error: expected ‘)’ before ‘*’ token
xs/dt_astro_common.inc:431: error: expected ‘)’ before ‘*’ token
xs/dt_astro_common.inc:447: error: expected ‘)’ before ‘*’ token
xs/dt_astro_common.inc:461: error: expected ‘)’ before ‘*’ token
In file included from xs/dt_astro.xs:9:
xs/dt_astro_solar.inc:64: error: expected ‘)’ before ‘*’ token
xs/dt_astro_solar.inc:153: error: expected ‘)’ before ‘*’ token
xs/dt_astro_solar.inc:211: error: expected ‘)’ before ‘*’ token
xs/dt_astro_solar.inc:227: error: expected ‘)’ before ‘*’ token
xs/dt_astro_solar.inc:255: error: expected ‘)’ before ‘*’ token
xs/dt_astro_solar.inc:280: error: expected ‘)’ before ‘*’ token
In file included from xs/dt_astro.xs:10:
xs/dt_astro_lunar.inc:8: error: expected ‘)’ before ‘*’ token
In file included from xs/dt_astro.xs:10:
xs/dt_astro_lunar.inc:255: error: expected ‘)’ before ‘*’ token
xs/dt_astro_lunar.inc:274: error: expected ‘)’ before ‘*’ token
xs/dt_astro_lunar.inc:343: error: expected ‘)’ before ‘*’ token
xs/dt_astro_lunar.inc:596: error: expected ‘)’ before ‘*’ token
xs/dt_astro_lunar.inc:656: error: expected ‘)’ before ‘*’ token
In file included from xs/dt_astro.xs:11:
xs/dt_astro_solar_term.inc:7: error: expected ‘)’ before ‘*’ token
xs/dt_astro_solar_term.inc:13: error: expected ‘)’ before ‘*’ token
xs/dt_astro_solar_term.inc:19: error: expected ‘)’ before ‘*’ token
xs/dt_astro_solar_term.inc:48: error: expected ‘)’ before ‘*’ token
xs/dt_astro_solar_term.inc:77: error: expected ‘)’ before ‘*’ token
xs/dt_astro_solar_term.inc:105: error: expected ‘)’ before ‘*’ token
xs/dt_astro.xs: In function ‘DT_Astro__init_global_cache’:
xs/dt_astro.xs:17: error: ‘struct DT_ASTRO_GLOBAL_CACHE’ has no member named ‘cache’
xs/dt_astro.xs: In function ‘DT_Astro__clear_global_cache’:
xs/dt_astro.xs:25: error: ‘mpfr_t’ undeclared (first use in this function)
xs/dt_astro.xs:25: error: (Each undeclared identifier is reported only once
xs/dt_astro.xs:25: error: for each function it appears in.)
xs/dt_astro.xs:25: error: ‘v’ undeclared (first use in this function)
xs/dt_astro.xs:25: error: ‘struct DT_ASTRO_GLOBAL_CACHE’ has no member named ‘cache’
xs/dt_astro.xs:27: warning: implicit declaration of function ‘mpfr_clear’
xs/dt_astro.xs:31: error: ‘struct DT_ASTRO_GLOBAL_CACHE’ has no member named ‘cache’
xs/dt_astro.c: In function ‘XS_DateTime__Astro_polynomial’:
xs/dt_astro.c:295: error: ‘mpfr_t’ undeclared (first use in this function)
xs/dt_astro.c:295: error: expected ‘;’ before ‘x’
xs/dt_astro.c:296: error: expected ‘;’ before ‘RETVAL’
xs/dt_astro.c:300: warning: implicit declaration of function ‘mpfr_init_set_str’
xs/dt_astro.c:300: error: ‘x’ undeclared (first use in this function)
xs/dt_astro.c:300: error: ‘GMP_RNDN’ undeclared (first use in this function)
xs/dt_astro.xs:108: warning: implicit declaration of function ‘mpfr_init’
xs/dt_astro.xs:108: error: ‘RETVAL’ undeclared (first use in this function)
xs/dt_astro.xs:110: warning: implicit declaration of function ‘mpfr_set_ui’
xs/dt_astro.xs:113: error: ‘coefs’ undeclared (first use in this function)
xs/dt_astro.xs:114: error: expected expression before ‘)’ token
xs/dt_astro.xs:114: error: expected expression before ‘)’ token
xs/dt_astro.xs:114: error: expected expression before ‘)’ token
xs/dt_astro.xs:114: warning: left-hand operand of comma expression has no effect
xs/dt_astro.xs:116: error: expected expression before ‘)’ token
xs/dt_astro.xs:116: warning: left-hand operand of comma expression has no effect
xs/dt_astro.xs:120: warning: implicit declaration of function ‘dt_astro_polynomial’
xs/dt_astro.c:330: warning: implicit declaration of function ‘mpfr_snprintf’
xs/dt_astro.c: In function ‘XS_DateTime__Astro_ephemeris_correction’:
xs/dt_astro.c:348: error: ‘mpfr_t’ undeclared (first use in this function)
xs/dt_astro.c:348: error: expected ‘;’ before ‘RETVAL’
xs/dt_astro.xs:136: error: ‘RETVAL’ undeclared (first use in this function)
xs/dt_astro.xs:137: warning: implicit declaration of function ‘ephemeris_correction’
xs/dt_astro.c: In function ‘XS_DateTime__Astro_dynamical_moment’:
xs/dt_astro.c:374: error: ‘mpfr_t’ undeclared (first use in this function)
xs/dt_astro.c:374: error: expected ‘;’ before ‘moment’
xs/dt_astro.c:375: error: expected ‘;’ before ‘RETVAL’
xs/dt_astro.c:379: error: ‘moment’ undeclared (first use in this function)
xs/dt_astro.c:379: error: ‘GMP_RNDN’ undeclared (first use in this function)
xs/dt_astro.xs:145: error: ‘RETVAL’ undeclared (first use in this function)
xs/dt_astro.xs:146: warning: implicit declaration of function ‘dynamical_moment’
xs/dt_astro.c: In function ‘XS_DateTime__Astro_ymd_seconds_from_moment’:
xs/dt_astro.c:459: error: ‘mpfr_t’ undeclared (first use in this function)
xs/dt_astro.c:459: error: expected ‘;’ before ‘moment’
xs/dt_astro.xs:177: warning: ISO C90 forbids mixed declarations and code
xs/dt_astro.c:467: error: ‘moment’ undeclared (first use in this function)
xs/dt_astro.c:467: error: ‘GMP_RNDN’ undeclared (first use in this function)
xs/dt_astro.xs:180: warning: implicit declaration of function ‘ymd_seconds_from_moment’
xs/dt_astro.c: In function ‘XS_DateTime__Astro_julian_centuries_from_moment’:
xs/dt_astro.c:493: error: ‘mpfr_t’ undeclared (first use in this function)
xs/dt_astro.c:493: error: expected ‘;’ before ‘moment’
xs/dt_astro.c:494: error: expected ‘;’ before ‘RETVAL’
xs/dt_astro.c:498: error: ‘moment’ undeclared (first use in this function)
xs/dt_astro.c:498: error: ‘GMP_RNDN’ undeclared (first use in this function)
xs/dt_astro.xs:194: error: ‘RETVAL’ undeclared (first use in this function)
xs/dt_astro.xs:195: warning: implicit declaration of function ‘julian_centuries’
xs/dt_astro.c: In function ‘XS_DateTime__Astro_nth_new_moon’:
xs/dt_astro.c:529: error: ‘mpfr_t’ undeclared (first use in this function)
xs/dt_astro.c:529: error: expected ‘;’ before ‘RETVAL’
xs/dt_astro.xs:205: error: ‘RETVAL’ undeclared (first use in this function)
xs/dt_astro.xs:206: warning: implicit declaration of function ‘nth_new_moon’
xs/dt_astro.c: In function ‘XS_DateTime__Astro_lunar_longitude_from_moment’:
xs/dt_astro.c:555: error: ‘mpfr_t’ undeclared (first use in this function)
xs/dt_astro.c:555: error: expected ‘;’ before ‘moment’
xs/dt_astro.c:556: error: expected ‘;’ before ‘RETVAL’
xs/dt_astro.c:560: error: ‘moment’ undeclared (first use in this function)
xs/dt_astro.c:560: error: ‘GMP_RNDN’ undeclared (first use in this function)
xs/dt_astro.xs:214: error: ‘RETVAL’ undeclared (first use in this function)
xs/dt_astro.xs:215: warning: implicit declaration of function ‘lunar_longitude’
xs/dt_astro.c: In function ‘XS_DateTime__Astro_solar_longitude_from_moment’:
xs/dt_astro.c:589: error: ‘mpfr_t’ undeclared (first use in this function)
xs/dt_astro.c:589: error: expected ‘;’ before ‘moment’
xs/dt_astro.c:590: error: expected ‘;’ before ‘RETVAL’
xs/dt_astro.c:594: error: ‘moment’ undeclared (first use in this function)
xs/dt_astro.c:594: error: ‘GMP_RNDN’ undeclared (first use in this function)
xs/dt_astro.xs:224: error: ‘RETVAL’ undeclared (first use in this function)
xs/dt_astro.xs:225: warning: implicit declaration of function ‘solar_longitude’
xs/dt_astro.c: In function ‘XS_DateTime__Astro_lunar_phase_from_moment’:
xs/dt_astro.c:623: error: ‘mpfr_t’ undeclared (first use in this function)
xs/dt_astro.c:623: error: expected ‘;’ before ‘moment’
xs/dt_astro.c:624: error: expected ‘;’ before ‘RETVAL’
xs/dt_astro.c:628: error: ‘moment’ undeclared (first use in this function)
xs/dt_astro.c:628: error: ‘GMP_RNDN’ undeclared (first use in this function)
xs/dt_astro.xs:234: error: ‘RETVAL’ undeclared (first use in this function)
xs/dt_astro.xs:235: warning: implicit declaration of function ‘lunar_phase’
xs/dt_astro.c: In function ‘XS_DateTime__Astro_new_moon_after_from_moment’:
xs/dt_astro.c:657: error: ‘mpfr_t’ undeclared (first use in this function)
xs/dt_astro.c:657: error: expected ‘;’ before ‘moment’
xs/dt_astro.c:658: error: expected ‘;’ before ‘RETVAL’
xs/dt_astro.c:662: error: ‘moment’ undeclared (first use in this function)
xs/dt_astro.c:662: error: ‘GMP_RNDN’ undeclared (first use in this function)
xs/dt_astro.xs:244: error: ‘RETVAL’ undeclared (first use in this function)
xs/dt_astro.xs:245: warning: implicit declaration of function ‘new_moon_after_from_moment’
xs/dt_astro.c: In function ‘XS_DateTime__Astro_new_moon_before_from_moment’:
xs/dt_astro.c:691: error: ‘mpfr_t’ undeclared (first use in this function)
xs/dt_astro.c:691: error: expected ‘;’ before ‘moment’
xs/dt_astro.c:692: error: expected ‘;’ before ‘RETVAL’
xs/dt_astro.c:696: error: ‘moment’ undeclared (first use in this function)
xs/dt_astro.c:696: error: ‘GMP_RNDN’ undeclared (first use in this function)
xs/dt_astro.xs:254: error: ‘RETVAL’ undeclared (first use in this function)
xs/dt_astro.xs:255: warning: implicit declaration of function ‘new_moon_before_from_moment’
xs/dt_astro.c: In function ‘XS_DateTime__Astro_solar_longitude_before_from_moment’:
xs/dt_astro.c:725: error: ‘mpfr_t’ undeclared (first use in this function)
xs/dt_astro.c:725: error: expected ‘;’ before ‘moment’
xs/dt_astro.c:726: error: expected ‘;’ before ‘phi’
xs/dt_astro.c:727: error: expected ‘;’ before ‘RETVAL’
xs/dt_astro.c:731: error: ‘moment’ undeclared (first use in this function)
xs/dt_astro.c:731: error: ‘GMP_RNDN’ undeclared (first use in this function)
xs/dt_astro.c:737: error: ‘phi’ undeclared (first use in this function)
xs/dt_astro.xs:265: error: ‘RETVAL’ undeclared (first use in this function)
xs/dt_astro.xs:266: warning: implicit declaration of function ‘solar_longitude_before’
xs/dt_astro.c: In function ‘XS_DateTime__Astro_solar_longitude_after_from_moment’:
xs/dt_astro.c:767: error: ‘mpfr_t’ undeclared (first use in this function)
xs/dt_astro.c:767: error: expected ‘;’ before ‘moment’
xs/dt_astro.c:768: error: expected ‘;’ before ‘phi’
xs/dt_astro.c:769: error: expected ‘;’ before ‘RETVAL’
xs/dt_astro.c:773: error: ‘moment’ undeclared (first use in this function)
xs/dt_astro.c:773: error: ‘GMP_RNDN’ undeclared (first use in this function)
xs/dt_astro.c:779: error: ‘phi’ undeclared (first use in this function)
xs/dt_astro.xs:277: error: ‘RETVAL’ undeclared (first use in this function)
xs/dt_astro.xs:278: warning: implicit declaration of function ‘solar_longitude_after’
xs/dt_astro.c: In function ‘XS_DateTime__Event__SolarTerm_next_term_at_from_moment’:
xs/dt_astro.c:845: error: ‘mpfr_t’ undeclared (first use in this function)
xs/dt_astro.c:845: error: expected ‘;’ before ‘moment’
xs/dt_astro.c:846: error: expected ‘;’ before ‘phi’
xs/dt_astro.c:847: error: expected ‘;’ before ‘RETVAL’
xs/dt_astro.c:851: error: ‘moment’ undeclared (first use in this function)
xs/dt_astro.c:851: error: ‘GMP_RNDN’ undeclared (first use in this function)
xs/dt_astro.c:857: error: ‘phi’ undeclared (first use in this function)
xs/dt_astro.xs:307: error: ‘RETVAL’ undeclared (first use in this function)
xs/dt_astro.xs:308: warning: implicit declaration of function ‘next_term_at’
xs/dt_astro.c: In function ‘XS_DateTime__Event__SolarTerm_prev_term_at_from_moment’:
xs/dt_astro.c:887: error: ‘mpfr_t’ undeclared (first use in this function)
xs/dt_astro.c:887: error: expected ‘;’ before ‘moment’
xs/dt_astro.c:888: error: expected ‘;’ before ‘phi’
xs/dt_astro.c:889: error: expected ‘;’ before ‘RETVAL’
xs/dt_astro.c:893: error: ‘moment’ undeclared (first use in this function)
xs/dt_astro.c:893: error: ‘GMP_RNDN’ undeclared (first use in this function)
xs/dt_astro.c:899: error: ‘phi’ undeclared (first use in this function)
xs/dt_astro.xs:319: error: ‘RETVAL’ undeclared (first use in this function)
xs/dt_astro.xs:320: warning: implicit declaration of function ‘prev_term_at’
xs/dt_astro.c: In function ‘XS_DateTime__Event__SolarTerm_major_term_after_from_moment’:
xs/dt_astro.c:929: error: ‘mpfr_t’ undeclared (first use in this function)
xs/dt_astro.c:929: error: expected ‘;’ before ‘moment’
xs/dt_astro.c:930: error: expected ‘;’ before ‘RETVAL’
xs/dt_astro.c:934: error: ‘moment’ undeclared (first use in this function)
xs/dt_astro.c:934: error: ‘GMP_RNDN’ undeclared (first use in this function)
xs/dt_astro.xs:330: error: ‘RETVAL’ undeclared (first use in this function)
xs/dt_astro.xs:331: warning: implicit declaration of function ‘major_term_after’
xs/dt_astro.c: In function ‘XS_DateTime__Event__SolarTerm_major_term_before_from_moment’:
xs/dt_astro.c:963: error: ‘mpfr_t’ undeclared (first use in this function)
xs/dt_astro.c:963: error: expected ‘;’ before ‘moment’
xs/dt_astro.c:964: error: expected ‘;’ before ‘RETVAL’
xs/dt_astro.c:968: error: ‘moment’ undeclared (first use in this function)
xs/dt_astro.c:968: error: ‘GMP_RNDN’ undeclared (first use in this function)
xs/dt_astro.xs:340: error: ‘RETVAL’ undeclared (first use in this function)
xs/dt_astro.xs:341: warning: implicit declaration of function ‘major_term_before’
xs/dt_astro.c: In function ‘XS_DateTime__Event__SolarTerm_minor_term_after_from_moment’:
xs/dt_astro.c:997: error: ‘mpfr_t’ undeclared (first use in this function)
xs/dt_astro.c:997: error: expected ‘;’ before ‘moment’
xs/dt_astro.c:998: error: expected ‘;’ before ‘RETVAL’
xs/dt_astro.c:1002: error: ‘moment’ undeclared (first use in this function)
xs/dt_astro.c:1002: error: ‘GMP_RNDN’ undeclared (first use in this function)
xs/dt_astro.xs:350: error: ‘RETVAL’ undeclared (first use in this function)
xs/dt_astro.xs:351: warning: implicit declaration of function ‘minor_term_after’
xs/dt_astro.c: In function ‘XS_DateTime__Event__SolarTerm_minor_term_before_from_moment’:
xs/dt_astro.c:1031: error: ‘mpfr_t’ undeclared (first use in this function)
xs/dt_astro.c:1031: error: expected ‘;’ before ‘moment’
xs/dt_astro.c:1032: error: expected ‘;’ before ‘RETVAL’
xs/dt_astro.c:1036: error: ‘moment’ undeclared (first use in this function)
xs/dt_astro.c:1036: error: ‘GMP_RNDN’ undeclared (first use in this function)
xs/dt_astro.xs:360: error: ‘RETVAL’ undeclared (first use in this function)
xs/dt_astro.xs:361: warning: implicit declaration of function ‘minor_term_before’
make: *** [xs/dt_astro.o] Error 1
-> FAIL Installing DateTime::Astro failed. See /home/me/.cpanm/work/1408749993.1699/build.log for details. Retry with --force to force install it.

1 个答案:

答案 0 :(得分:5)

你展示的cpanm输出非常有用:C编译器抱怨它无法找到mpfr.h:

xs/dt_astro.h:9:18: error: mpfr.h: No such file or directory

在基于Debian的GNU / Linux发行版上,mpfr.h是libmpfr-dev package的一部分。安装使得安装DateTime :: Astro工作(在Debian unstable上试过)。

其他发行版可能有一个类似命名的GNU MPFR开发文件包。