Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't locate Switch.pm

How do I solve this error?

Can't locate Switch.pm in @INC (you may need to install the Switch module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
BEGIN failed--compilation aborted at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/html/DocTypeStrings.cpp] Error 2
like image 589
Deepak Singh Avatar asked Apr 26 '14 18:04

Deepak Singh


3 Answers

On Linux Mint I had to type

$ sudo apt-get install libswitch-perl
like image 110
yurishi Avatar answered Oct 20 '22 07:10

yurishi


You are getting this error because you don't have the Switch.pm perl module installed on your system. There are two ways to install it and both of them work on Ubuntu 14.04 as well.

  1. Install it through the Ubuntu repositories.

  2. Install the .pm through CPAN.

Installing Switch.pm using the Ubuntu repositories:

From the command-line, the installation can be completed by running the following command from the terminal (Ctrl-Alt-t):

 sudo apt-get install libswitch-perl

Installing Switch.pm using CPAN:

If you would prefer to install this via cpan, follow these instructions:

Open a terminal(Ctrl-Alt-t).

Enter the command cpan.

At the prompt cpan[1]>, type install Switch.

Once completed, Type exit.

Credits: Kevin Bowen

like image 21
4aRk Kn1gh7 Avatar answered Oct 20 '22 06:10

4aRk Kn1gh7


You can resolve this error by installing "perl-Switch"

for Amazon Linux / Redhat / Centos / etc:

sudo yum install -y perl-Switch

for Ubuntu:

sudo apt-get install -y libswitch-perl
like image 8
Jose Nobile Avatar answered Oct 20 '22 08:10

Jose Nobile