CSAILVision / LabelMeAnnotationTool

Source code for the LabelMe annotation tool.
MIT License
1.38k stars 434 forks source link

[Ubuntu 18.04] Can't locate globalvariables.pl #105

Open fzd9752 opened 4 years ago

fzd9752 commented 4 years ago

OS: Ubuntu 18.04 Follow Instruction: UBUNTU_16_04

I tried solution from https://github.com/CSAILVision/LabelMeAnnotationTool/issues/69 and https://github.com/CSAILVision/LabelMeAnnotationTool/issues/1:

Setting $LM_HOME by input in shell

export LM_HOME=/var/www/html/LabelMeAnnotationTool

But it doesn't work, the tool.html still shows _"Fatal: there are problems with fetchimage.cgi" when loading.

I have tried ubuntu 16 docker and it works well in my local server. I'm not sure whether there is special configure for ubuntu 18. It will be really appreciate, if you could help me to solve this problem.


Error Log:

[Mon Oct 28 16:48:05.529643 2019] [cgi:error] [pid 6417] [client 127.0.0.1:42144] AH01215: Can't locate globalvariables.pl in @INC (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /var/www/html/LabelMeAnnotationTool/annotationTools/perl/write_logfile.cgi line 2.: /var/www/html/LabelMeAnnotationTool/annotationTools/perl/write_logfile.cgi, referer: http://127.0.0.1/LabelMeAnnotationTool/tool.html?collection=LabelMe&mode=i&folder=null&image=null [Mon Oct 28 16:48:05.529709 2019] [cgi:error] [pid 6417] [client 127.0.0.1:42144] End of script output before headers: write_logfile.cgi, referer: http://127.0.0.1/LabelMeAnnotationTool/tool.html?collection=LabelMe&mode=i&folder=null&image=null [Mon Oct 28 16:48:05.529900 2019] [cgi:error] [pid 6386] [client 127.0.0.1:42146] AH01215: Can't locate globalvariables.pl in @INC (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /var/www/html/LabelMeAnnotationTool/annotationTools/perl/write_logfile.cgi line 2.: /var/www/html/LabelMeAnnotationTool/annotationTools/perl/write_logfile.cgi, referer: http://127.0.0.1/LabelMeAnnotationTool/tool.html?collection=LabelMe&mode=i&folder=null&image=null [Mon Oct 28 16:48:05.529952 2019] [cgi:error] [pid 6386] [client 127.0.0.1:42146] End of script output before headers: write_logfile.cgi, referer: http://127.0.0.1/LabelMeAnnotationTool/tool.html?collection=LabelMe&mode=i&folder=null&image=null

Lafite-Yu commented 4 years ago

I don't know anything about perl or apache…… Since it can't locate globalvariables.pl in @inc, I copied that to /etc/perl and it works……

znstj commented 3 years ago

I don't know anything about perl or apache…… Since it can't locate globalvariables.pl in @inc, I copied that to /etc/perl and it works……

You are right!Thanks!

nkrot commented 2 years ago

Being on ubuntu 18.04 that runs apache 2.4 and perl v5.26.1 and having followed the insufficient instructions in aforementioned UBUNTU.md, I hit the same issue as well.

The solution was to add to apache configuration (sites-available/default.conf) the following line:

SetEnv PERL5LIB /var/www/html/LabelMeAnnotationTool/annotationTools/perl

# and this one did not work
#PerlSwitches -I/var/www/html/LabelMeAnnotationTool/annotationTools/perl

This directive needs to be placed outside of <Directory/> block.

huynhbaobk commented 2 years ago

Being on ubuntu 18.04 that runs apache 2.4 and perl v5.26.1 and having followed the insufficient instructions in aforementioned UBUNTU.md, I hit the same issue as well.

The solution was to add to apache configuration (sites-available/default.conf) the following line:

SetEnv PERL5LIB /var/www/html/LabelMeAnnotationTool/annotationTools/perl

# and this one did not work
#PerlSwitches -I/var/www/html/LabelMeAnnotationTool/annotationTools/perl

This directive needs to be placed outside of <Directory/> block.

This works for me! Many thanks