Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROUGE-1.5.5.pl - XML::Parser dependency error #9

Open
cgebe opened this issue Apr 28, 2018 · 8 comments
Open

ROUGE-1.5.5.pl - XML::Parser dependency error #9

cgebe opened this issue Apr 28, 2018 · 8 comments

Comments

@cgebe
Copy link
Contributor

cgebe commented Apr 28, 2018

ROUGE-1.5.5.pl has a XML::Parser dependency, without this module installed, the following error is printed:

Can't locate XML/Parser.pm in @INC (you may need to install the XML::Parser module) (@INC contains: /root/.files2rouge /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /root/.files2rouge/XML/DOM.pm line 41.
BEGIN failed--compilation aborted at /root/.files2rouge/XML/DOM.pm line 70.
Compilation failed in require at /root/.files2rouge/ROUGE-1.5.5.pl line 177.
BEGIN failed--compilation aborted at /root/.files2rouge/ROUGE-1.5.5.pl line 177.
Traceback (most recent call last):
  File "/usr/local/bin/files2rouge", line 11, in <module>
    load_entry_point('files2rouge==2.0.0', 'console_scripts', 'files2rouge')()
  File "/usr/local/lib/python3.6/site-packages/files2rouge-2.0.0-py3.6.egg/files2rouge/files2rouge.py", line 81, in main
    output = r.convert_and_evaluate(rouge_args=rouge_args_str)
  File "/usr/local/lib/python3.6/site-packages/pyrouge/Rouge155.py", line 361, in convert_and_evaluate
    rouge_output = self.evaluate(system_id, rouge_args)
  File "/usr/local/lib/python3.6/site-packages/pyrouge/Rouge155.py", line 336, in evaluate
    rouge_output = check_output(command).decode("UTF-8")
  File "/usr/local/lib/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "/usr/local/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/root/.files2rouge/ROUGE-1.5.5.pl', '-e', '/root/.files2rouge/data', '-c', '95', '-r', '1000', '-n', '2', '-a', '-m', '/tmp/tmp9qlzfbsc/rouge_conf.xml']' returned non-zero exit status 2.

Probably good to mention in the README

@cgebe
Copy link
Contributor Author

cgebe commented Apr 28, 2018

Solution:

$ apt-get install -y cpanminus
$ cpanm --force XML::Parser

@coree
Copy link

coree commented Mar 15, 2019

For me the command sudo apt-get install libxml-parser-perl worked. However, the parser was not installed in my case and cpanminus didn't worked.

@sshleifer
Copy link

is there a mac equivalent?

@pltrdy
Copy link
Owner

pltrdy commented Mar 3, 2020

@sshleifer I'm not a Mac user but I would guess:

@markusdr
Copy link

On systems with yum, this works well:

sudo yum install -y "perl(XML::LibXML)"

See also: https://grantm.github.io/perl-libxml-by-example/installation.html

And, for good measure, to avoid another common error:

sudo yum install -y "perl(DB_File)"

@wentinghome
Copy link

Is there a Windows equivalent?

@pltrdy
Copy link
Owner

pltrdy commented Jul 16, 2020

@wentinghome I'm not using Windows.

However, it seems like you may install perl with either strawberry or activestate (see https://grantm.github.io/perl-libxml-by-example/installation.html#installing-on-windows) so you can:

# strawberry
cpan XML::LibXML

# active state
ppm install XML::LibXML

@kaushal0494
Copy link

how to resolve this problem without using sudo in for Ubuntu? I am having a hard time. If someone can help that will be great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants