我正在尝试在 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
所以问题似乎是 Ubuntu 15.10 附带了旧版本的 Perl6。
(我在 Ubuntu 上安装 Perl6 使用sudo apt-get install rakudo
.)
我现在尝试将 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
).