部署依赖于C的Perl库
我有一个可以同时在Linux(Red Hat)和Unix(Solaris)上部署的应用程序.我的应用程序使用内置的Perl进行安装,然后创建自己的本地Perl(新用户).
I have an application that I deploy on both Linux (Red Hat) and Unix (Solaris). My application installs itself using the built in Perl, and from then creates its own local Perl (new user).
I would like to know what is the best way to deploy Curses::UI
? Currently I install other modules by just copying them to my local perl lib
folder, but these are pure Perl modules that don't depend on C libraries (.so shared objects, XS, etc.).
我还必须事先为每个平台编译libncurses
吗?
Also will I have to compile libncurses
for each platform beforehand?
注意::计算机没有网络连接,因此我无法使用CPAN模块.
NOTE: The computer doesnt have network connectivity, hence I cant use the CPAN module.
您应该使用CPAN客户端(CPAN.pm,CPANPLUS)从CPAN部署模块,例如Curses :: UI.通常,您需要开发库来编译XS模块.对于Curses :: UI,Ubuntu软件包称为libncurses-dev
.其他Linux发行版可能具有相同或相似名称的ncurses devel软件包.
You should use a CPAN client (CPAN.pm, CPANPLUS) to deploy modules such as Curses::UI from CPAN. Usually you need development libs to compile XS modules. For Curses::UI the Ubuntu package is called libncurses-dev
. Other Linux distributions probably have an ncurses devel package under the same or similar name.
您说您有本地的Perl库.具有本地库的一个很好的方法是使用相同名称的模块- local :: lib .它的文档将告诉您如何使用CPAN客户端轻松地将模块安装到local :: lib中.
You said you have a local Perl lib. A very good way to have a local lib is the module of the same name - local::lib. Its documentation will tell you how to easily install modules into your local::lib using a CPAN client.