CPAN GD模块安装失败使用Cygwin [英] CPAN GD module install failure using Cygwin

查看:270
本文介绍了CPAN GD模块安装失败使用Cygwin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图解决为什么CPAN GD模块无法使用Cygwin安装2天了。任何帮助深表感谢。谢谢!

I have been trying to troubleshoot why CPAN GD module fails to install using Cygwin for 2 days now. Any help is much appreciated. Thanks!


cpan install GD
Going to read '/home/xxxxxxxxxx/.cpan/Metadata'
  Database was generated on Sat, 27 Dec 2014 12:17:02 GMT
Running install for module 'GD'
Running make for L/LD/LDS/GD-2.56.tar.gz
Checksum for /home/xxxxxxxxxx/.cpan/sources/authors/id/L/LD/LDS/GD-2.56.tar.gz ok

  CPAN.pm: Going to build L/LD/LDS/GD-2.56.tar.gz

Configuring for libgd version 2.1.0.
Checking for stray libgd header files...

** WARNING: found gd.h header file in /usr/include/gd.h, but it is expected at /usr/local/include/gd.h. This may cause compile errors! **


** WARNING: found gd.h header file in /usr/include/gd.h, but it is expected at /usr/local/include/gd.h. This may cause compile errors! **
** Possible problems found **

Included Features:          GD_JPEG GD_GIF GD_GIFANIM GD_OPENPOLYGON
GD library used from:       /usr/local
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'GD' version '2.56'
Building GD
Extracting Image.pm (with variable substitutions)
gcc -I/usr/local/include -I/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE -DXS_VERSION="2.56" -DVERSION="2.56" -DHAVE_JPEG -DHAVE_GIF -c -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict-aliasing -pipe -fstack-protector -O3 -o lib/GD.o lib/GD.c
ExtUtils::Mkbootstrap::Mkbootstrap('blib/arch/auto/GD/GD.bs')
g++ --shared -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector -o blib/arch/auto/GD/GD.dll lib/GD.o /usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/libperl.dll.a -L/usr/local/lib -ljpeg -lz -lgd
lib/GD.o:GD.c:(.text+0xd1b): undefined reference to `gdImageCreateFromGd2Ptr'
lib/GD.o:GD.c:(.text+0xd1b): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `gdImageCreateFromGd2Ptr'
lib/GD.o:GD.c:(.text+0xeec): undefined reference to `gdImageCreateFromGd2Ptr'
lib/GD.o:GD.c:(.text+0xeec): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `gdImageCreateFromGd2Ptr'
lib/GD.o:GD.c:(.text+0x1bfc): undefined reference to `gdImageCreateFromGd2Part'
lib/GD.o:GD.c:(.text+0x1bfc): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `gdImageCreateFromGd2Part'
lib/GD.o:GD.c:(.text+0x39b8): undefined reference to `gdImageGd2Ptr'
lib/GD.o:GD.c:(.text+0x39b8): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `gdImageGd2Ptr'
lib/GD.o:GD.c:(.text+0x3c16): undefined reference to `gdImageGd2Ptr'
lib/GD.o:GD.c:(.text+0x3c16): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `gdImageGd2Ptr'
lib/GD.o:GD.c:(.text+0x3e4f): undefined reference to `gdImageJpegPtr'
lib/GD.o:GD.c:(.text+0x3e4f): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `gdImageJpegPtr'
lib/GD.o:GD.c:(.text+0x11ec9): undefined reference to `gdImageCreateFromJpeg'
lib/GD.o:GD.c:(.text+0x11ec9): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `gdImageCreateFromJpeg'
lib/GD.o:GD.c:(.text+0x12175): undefined reference to `gdImageCreateFromJpegCtx'
lib/GD.o:GD.c:(.text+0x12175): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `gdImageCreateFromJpegCtx'
collect2: error: ld returned 1 exit status
error building blib/arch/auto/GD/GD.dll from lib/GD.o at /usr/lib/perl5/5.14/ExtUtils/CBuilder/Base.pm line 310.
  LDS/GD-2.56.tar.gz
  ./Build -- NOT OK
Running Build test
  Can't test without successful make
Running Build install
  Make had returned bad status, install seems impossible

make -v
GNU Make 4.0
Built for x86_64-pc-cygwin
Copyright (C) 1988-2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.


推荐答案

我相信你有两个版本的GD库安装。一个在 / usr 和一个在 / usr / local 。它使用 / usr 的头文件和 / usr / local 的共享库。

I believe you have two versions of the GD library installed. One in /usr and one in /usr/local. It's using the header file from /usr and the shared libraries from /usr/local. The hint is this.

** WARNING: found gd.h header file in /usr/include/gd.h, but it is expected at /usr/local/include/gd.h. This may cause compile errors! **

您可能只有中安装了GD运行时/ usr / local 。在绝望中,GD.pm从 / usr 中的默认位置抓取标题。

You probably have only the GD runtime (shared library) installed in /usr/local. In desperation, GD.pm is grabbing the headers from the default location in /usr.

尝试安装 libgd3 libgd-devel Cygwin包和删除libgd的任何部分在 / usr / local 。特别要确保其中gdlib-config 指向 / usr / bin / gdlib-config

Try installing both the libgd3 and libgd-devel Cygwin packages and removing whatever parts of libgd is in /usr/local. In particular, make sure which gdlib-config points at /usr/bin/gdlib-config.

这篇关于CPAN GD模块安装失败使用Cygwin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆