安装用于perl的GD模块-安装程序时出错

安装用于perl的GD模块-安装程序时出错,perl,gd,cpan,Perl,Gd,Cpan,我目前正试图在Ubuntu中安装Circos 按照说明,我已转到bin文件夹并运行perl circos 我得到一个错误,告诉我一堆模块没有安装。我试着安装它们,除了两个外,其他都能正常工作 当我进入cpanshell时: cpan[7]> install GD.pm Running install for module 'GD' LDS/GD-2.56.tar.gz Has already been unwrapped into directory /home/qiime/.cp

我目前正试图在Ubuntu中安装Circos

按照说明,我已转到bin文件夹并运行
perl circos

我得到一个错误,告诉我一堆模块没有安装。我试着安装它们,除了两个外,其他都能正常工作

当我进入
cpan
shell时:

cpan[7]> install GD.pm
Running install for module 'GD'
  LDS/GD-2.56.tar.gz
  Has already been unwrapped into directory /home/qiime/.cpan/build/GD-2.56-DqDuWT
  LDS/GD-2.56.tar.gz
  '/usr/bin/perl Build.PL --installdirs site' returned status 512, not re-running
cpan[1]> install GD.pm
Reading '/home/qiime/.cpan/Metadata'
  Database was generated on Wed, 27 Jan 2016 07:41:02 GMT
Running install for module 'GD'
Checksum for /home/qiime/.cpan/sources/authors/id/L/LD/LDS/GD-2.56.tar.gz ok
Scanning cache /home/qiime/.cpan/build for sizes
............................................................................DONE
Configuring L/LD/LDS/GD-2.56.tar.gz with Build.PL
Configuring for libgd version 2.0.36.
Checking for stray libgd header files...none found.

Unknown option: installdirs
Usage: perl Build.PL [options]

Configure GD module.

 Options:
     -options       "JPEG,FT,PNG,GIF,XPM,ANIMGIF"   feature options, separated by commas
     -lib_gd_path   path            path to libgd
     -lib_ft_path   path            path to Freetype library
     -lib_png_path  path            path to libpng
     -lib_jpeg_path path            path to libjpeg
     -lib_xpm_path  path            path to libxpm
     -lib_zlib_path path            path to libpng
     -ignore_missing_gd             Ignore missing or old libgd installations and try to compile anyway

If no options are passed on the command line.  The program will
attempt to autoconfigure itself with the gdlib-config program (present
in GD versions 2.0.27 or later).  Otherwise it will prompt for these
values interactively.
Warning: No success on command[/usr/bin/perl Build.PL --installdirs site]
  LDS/GD-2.56.tar.gz
  /usr/bin/perl Build.PL --installdirs site -- NOT OK
Failed during this command:
 LDS/GD-2.56.tar.gz                           : writemakefile NO '/usr/bin/perl Build.PL --installdirs site' returned status 512
如果我从主终端运行它:

qiime@qiime-190-virtual-box:~/Documents/circos-0.69/bin$ perl -MCPAN -e 'install GD'
Reading '/home/qiime/.cpan/Metadata'
  Database was generated on Wed, 27 Jan 2016 07:41:02 GMT
Running install for module 'GD'
Checksum for /home/qiime/.cpan/sources/authors/id/L/LD/LDS/GD-2.56.tar.gz ok

==> Couldn't mkdir '/home/qiime/.cpan/build/tmp-8161': Permission denied

==> Cannot continue: Please find the reason why I cannot make the <==
==> directory                                                     <==
==> /home/qiime/.cpan/build/tmp-8161                              <==
==> and fix the problem, then retry.                              <==
编辑:更新 我发现我可能没有安装
libgd
,所以我这样做了。我尝试在
cpan
shell中运行
install GD.pm

cpan[7]> install GD.pm
Running install for module 'GD'
  LDS/GD-2.56.tar.gz
  Has already been unwrapped into directory /home/qiime/.cpan/build/GD-2.56-DqDuWT
  LDS/GD-2.56.tar.gz
  '/usr/bin/perl Build.PL --installdirs site' returned status 512, not re-running
cpan[1]> install GD.pm
Reading '/home/qiime/.cpan/Metadata'
  Database was generated on Wed, 27 Jan 2016 07:41:02 GMT
Running install for module 'GD'
Checksum for /home/qiime/.cpan/sources/authors/id/L/LD/LDS/GD-2.56.tar.gz ok
Scanning cache /home/qiime/.cpan/build for sizes
............................................................................DONE
Configuring L/LD/LDS/GD-2.56.tar.gz with Build.PL
Configuring for libgd version 2.0.36.
Checking for stray libgd header files...none found.

Unknown option: installdirs
Usage: perl Build.PL [options]

Configure GD module.

 Options:
     -options       "JPEG,FT,PNG,GIF,XPM,ANIMGIF"   feature options, separated by commas
     -lib_gd_path   path            path to libgd
     -lib_ft_path   path            path to Freetype library
     -lib_png_path  path            path to libpng
     -lib_jpeg_path path            path to libjpeg
     -lib_xpm_path  path            path to libxpm
     -lib_zlib_path path            path to libpng
     -ignore_missing_gd             Ignore missing or old libgd installations and try to compile anyway

If no options are passed on the command line.  The program will
attempt to autoconfigure itself with the gdlib-config program (present
in GD versions 2.0.27 or later).  Otherwise it will prompt for these
values interactively.
Warning: No success on command[/usr/bin/perl Build.PL --installdirs site]
  LDS/GD-2.56.tar.gz
  /usr/bin/perl Build.PL --installdirs site -- NOT OK
Failed during this command:
 LDS/GD-2.56.tar.gz                           : writemakefile NO '/usr/bin/perl Build.PL --installdirs site' returned status 512
这本身并不是一个真正的解决方案,但请看一下:


正如G.Cito所建议的,perl中的GD模块存在问题

我使用了他发布的说明以及以下内容来修复错误:

具体来说,最后一段代码是正确安装perl的GD模块所需的:

srctemp$ curl -O http://www.cpan.org/authors/id/L/LD/LDS/GD-2.49.tar.gz (if curl fails copy and past on your browser)
srctemp$ tar -xzvf GD-2.49.tar.gz
srctemp$ cd GD-2.49
srctemp/GD-2.49$ perl Makefile.PL
srctemp/GD-2.49$ make
srctemp/GD-2.49$ sudo make install

必须提出的明显问题。。。有人曾经说过:“99%的UNIX问题与权限有关”,那么您是否以不同的用户身份运行这些命令?(*e.8您是否第一次以root用户身份运行您的CPAN shell,后来又以用户身份运行)。磁盘空间用完了吗?您的
%INC
看起来有点分散,似乎没有遵循特定于应用程序的管理,这使得使用“远距离更新”打破某种东西变得更容易。我只有一个用户,并且以相同的方式运行所有内容。我检查了磁盘空间,一切正常。请查看我的更新…我刚刚发现我需要先安装
libgd
。如前所述,这不是一个真正的修复程序,但为我指明了正确的方向。看看我的答案,看看我是如何解决这个问题的。你能把“最后一点代码”复制到你的答案中吗?我不知道你指的是哪一段代码,特别是,如果链接失效,这个答案就没那么有用了。