在 Ubuntu 15.10 上安装 Perl6 和 Panda。 bootstrap.pl 的问题
Installing Perl6 and Panda on Ubuntu 15.10. Problems with bootstrap.pl
我正在尝试在 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。
(我使用 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
)。
根据 irc.freenode.net
上 IRC 频道 #perl6
上的用户 RabidGravy
:
the problem with installing panda there is due to PERL5LIB or PERLLIB
being set in the environment
所以现在我尝试在安装前清除 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
,很难。)
我正在尝试在 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。
(我使用 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
)。
根据 irc.freenode.net
上 IRC 频道 #perl6
上的用户 RabidGravy
:
the problem with installing panda there is due to PERL5LIB or PERLLIB being set in the environment
所以现在我尝试在安装前清除 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
,很难。)