0

我在 Perl 方面没有经验,也没有在 Ubuntu 上工作。

我在 Ubuntu 10.10 上工作。我从cat-install 脚本和 SQLite安装了最新的 Catalyst 版本sudo apt-get install sqlite。安装 Catalyst 后,我​​能够使用 Catalyst 脚本运行我的服务器,但是在安装 SQLite 后,当我尝试运行服务器时,我得到一个编译perl5/namespace/autoclean.pm错误&namespace undefined subroutine。但我从来没有接触过那里的任何代码。

我不想调试我的问题,因为我的 Ubuntu 昨晚已经崩溃了。:( 我只需要知道安装这些包的最佳实践,如果有人能具体指导我如何安装这些包,我将不胜感激。

4

2 回答 2

1

这是我前几天在工作中所做的:

1.  Obtain perl, e.g. current stable (as of the 12th of Jan 2011):

 $ curl http://cpan.perl.org/src/5.0/perl-5.12.2.tar.gz -O
 $ gunzip -c perl-5.12.2.tar.gz | tar xvf -
 $ cd perl 5.12.2
 $ sh Configure -des -Dprefix=~/perl-5.12 # install into ~/perl-5.12
 $ make
 $ make test
 $ make install

2.  Configure PATH and cpan config, by putting the following in ~/.bashrc:

 export PERL_MM_USE_DEFAULT=1
 export PATH=~/perl-5.12/bin:$PATH
 export MANPATH=~/perl-5.12/man:$MANPATH # breaks stuff on solaris

Make CPAN slightly nicer to deal with.

 $ source ~/.bashrc
 $ cpan Bundle::CPAN
 $ cpan App::cpanminus

=head2 Deploying to a different machine using the same architecture

Just copy ~/perl-5.12 over to the new machine and put perl-5.12/bin in the $PATH.

然后安装催化剂:

$ cpanm Catalyst::Devel
$ cpanm Catalyst::Runtime
$ cpanm DBIx::Class # gives you sqlite along with it
于 2011-01-17T11:00:43.133 回答
1

Catalyst 运行时也打包在 Ubuntu 上。您可以像使用 SQLite 一样安装它。包名是libcatalyst-perl.

于 2011-01-17T11:08:46.787 回答