3

I am currently trying to install Circos in Ubuntu.

Per the instructions, I have gone to the bin folder and run perl circos

I got an error telling me a bunch of modules were not installed. I tried to install them, and all worked except two.

When I go into the 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

If I run it from the main terminal:

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.                              <==

Every other (~15 modules total) module installed with no problem. I'm not sure what to do at this point. I assume it's something simple I am missing...?

For completeness, here is the error from trying to run perl circos:

qiime@qiime-190-virtual-box:~/Documents/circos-0.69/bin$ perl circos
*** REQUIRED MODULE(S) MISSING OR OUT-OF-DATE ***

You are missing one or more Perl modules, require newer versions, or some modules failed to load. Use CPAN to install it as described in this tutorial

http://www.circos.ca/documentation/tutorials/configuration/perl_and_modules

missing GD
  error Can't locate GD.pm in @INC (@INC contains: /home/qiime/Documents/circos-0.69/bin/lib /home/qiime/Documents/circos-0.69/bin/../lib /home/qiime/Documents/circos-0.69/bin /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at (eval 25) line 1.
missing GD::Polyline
  error Can't locate GD/Polyline.pm in @INC (@INC contains: /home/qiime/Documents/circos-0.69/bin/lib /home/qiime/Documents/circos-0.69/bin/../lib /home/qiime/Documents/circos-0.69/bin /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at (eval 26) line 1.

EDIT: UPDATE I found that I may not have install libgd, so I did that. I tried running install GD.pm in the cpan shell:

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
Gaius Augustus
  • 940
  • 2
  • 15
  • 37
  • Obvious questions that must be asked ... someone once said: "99% of UNIX issues are permissions related", so are you running the commands as different users? (*i.e.8 did you run your CPAN shell as `root` the first time and later as a user). Are you out of disk space? Your `%INC` looks a little bit spread around and does not seem to follow application specific management, this makes it easier to break an something with "updates at a distance". – G. Cito Jan 27 '16 at 20:13
  • I only have one user, and have run everything the same way. I checked disk space and it is fine. Please see my updates...I just found out I needed `libgd` installed first. – Gaius Augustus Jan 27 '16 at 20:25

2 Answers2

3

As G. Cito suggested, there was an issue with GD module in perl.

I used the instructions he posted along with the following to fix the errors:

Specifically, the very last bit of code was what I needed in order to properly install GD module for perl:

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
Community
  • 1
  • 1
Gaius Augustus
  • 940
  • 2
  • 15
  • 37
  • 1
    Can you copy the "very last bit of code" into your answer? I can't figure out what bit of code you're referring to, specifically, and if that link ever goes dead, this answer will be a lot less useful. – ThisSuitIsBlackNot Jan 27 '16 at 23:02
2

This is not really a fix per se but take a look at:

Community
  • 1
  • 1
G. Cito
  • 6,210
  • 3
  • 29
  • 42
  • As mentioned, this was not really a fix, but pointed me in the correct direction. See my answer for how I actually fixed the problem. – Gaius Augustus Jan 27 '16 at 22:01