部署依赖于C的Perl库 [英] Deploying C-dependent Perl libraries

查看:90
本文介绍了部署依赖于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.

这篇关于部署依赖于C的Perl库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆