在Ubuntu 15.10上安装Perl6和Panda。 bootstrap.pl的问题

时间:2016-03-24 13:20:56

标签: perl6

我正在尝试在Ubuntu 15.10上安装Panda。首先我试过了:

git clone --recursive git://github.com/tadzik/panda.git
cd panda
perl6 bootstrap.pl

最后一个命令给出了错误消息:

===SORRY!=== Error while compiling bootstrap.pl
Confused
at bootstrap.pl:3
------> use v6.⏏c;
    expecting any of:
        statement list

根据@gfldex的评论(见下文),然后我跑了:

> perl6 --version
This is perl6 version 2014.07 built on parrot 6.6.0 revision 0

所以问题似乎是旧版本的Perl6附带了Ubuntu 15.10。 (我使用sudo apt-get install rakudo在Ubuntu上安装了Perl6。)

我现在尝试将我的Perl6更新到最新版本:

wget http://rakudo.org/downloads/star/rakudo-star-2016.01.tar.gz
tar xzf rakudo-star-2016.01.tar.gz
cd rakudo-star-2016.01
perl Configure.pl --backend=moar --gen-moar
make
make install

但是最后一个命令失败了:

cd modules/panda && /home/hakon/install_rakudo/rakudo-star-2016.01/install/bin/perl6-m bootstrap.pl
==> Bootstrapping Panda
==> Installing panda from a local directory '/home/hakon/install_rakudo/rakudo-star-2016.01/modules/panda'
==> panda depends on File::Find, Shell::Command, JSON::Fast
==> Shell::Command depends on File::Find
==> Fetching File::Find
==> Building File::Find
==> Testing File::Find
Perl v6.0.0 required--this is only v5.20.2, stopped at lib/File/Find.pm line 1.
BEGIN failed--compilation aborted at lib/File/Find.pm line 1.
Compilation failed in require at /home/hakon/perl5/lib/perl5/App/Prove/State.pm line 6.
BEGIN failed--compilation aborted at /home/hakon/perl5/lib/perl5/App/Prove/State.pm line 6.
Compilation failed in require at /home/hakon/perl5/lib/perl5/App/Prove.pm line 10.
BEGIN failed--compilation aborted at /home/hakon/perl5/lib/perl5/App/Prove.pm line 10.
Compilation failed in require at /home/hakon/perl5/bin/prove line 8.
BEGIN failed--compilation aborted at /home/hakon/perl5/bin/prove line 8.
The spawned process exited unsuccessfully (exit code: 255)

@gfldex后续输入后,我尝试删除包 rakudo。也许二进制文件/usr/bin/perl6的存在会导致安装程序混淆:

> sudo apt-get remove rakudo
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libparrot6.6.0 linux-headers-4.2.0-16 linux-headers-4.2.0-16-generic linux-headers-4.2.0-27 linux-headers-4.2.0-27-generic linux-image-4.2.0-16-generic
  linux-image-4.2.0-27-generic linux-image-extra-4.2.0-16-generic linux-image-extra-4.2.0-27-generic nqp parrot parrot-minimal
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  rakudo
0 upgraded, 0 newly installed, 1 to remove and 6 not upgraded.
After this operation, 38,8 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 318170 files and directories currently installed.)
Removing rakudo (2014.07-4build1) ...
Processing triggers for man-db (2.7.4-1) ...

然后测试是否成功删除了包:

> pwd
/home/hakon/install_rakudo/rakudo-star-2016.01
> which perl6
./perl6
> perl6 --version
This is Rakudo version 2016.01.1 built on MoarVM version 2016.01
implementing Perl 6.c.
> cd ..
> perl6 --version
The program 'perl6' is currently not installed. You can install it by typing:
sudo apt-get install rakudo
> cd rakudo-star-2016.01

然后我重试make install,但它失败的错误消息与以前完全相同。

然后我尝试了完全重新安装:

cd ..
rm -rf rakudo-star-2016.01/
wget http://rakudo.org/downloads/star/rakudo-star-2016.01.tar.gz
tar xzf rakudo-star-2016.01.tar.gz
cd rakudo-star-2016.01
perl Configure.pl --backend=moar --gen-moar
make
make install

但我仍然从make install收到相同的错误消息。

然后我尝试再次手动重新安装Panda

cd ..
git clone --recursive git://github.com/tadzik/panda.git
cd panda
../rakudo-star-2016.01/perl6 bootstrap.pl

但是,同样的错误消息(Perl v6.0.0 required--this is only v5.20.2)也失败了。

1 个答案:

答案 0 :(得分:3)

RabidGravy上的IRC频道#perl6上的用户irc.freenode.net

  

安装panda的问题是由于PERL5LIB或PERLLIB   在环境中设置

所以现在我在安装之前尝试清除PERL5LIB

PERL5LIB= make install

它工作正常。

最后,我必须将以下路径添加到~/.bashrc以完成设置:

/home/hakon/install_rakudo/rakudo-star-2016.01/install/bin
/home/hakon/install_rakudo/rakudo-star-2016.01/install/share/perl6/site/bin

(很高兴知道为什么有必要清除PERL5LIB,这很难。)