【问题标题】:how to install perl Inline::Python in debian如何在 debian 中安装 perl Inline::Python
【发布时间】:2015-05-04 16:34:48
【问题描述】:

我尝试通过

安装 perl Inline::Python 模块
cpan Inline::Python

我收到以下错误

ERROR from evaluation of /root/.cpan/build/NINE-Y6sbU9/Inline-Python-0.49/Makefile.PL: Could not find Python.h in include path. make will not work at ./Makefile.PL line 66.
Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site]

然后我尝试使用 apt-get install python-dev 安装 python-dev。我得到了以下内容:

python-dev : Depends: python2.6-dev (>= 2.6.6-1~) but it is not going to be installed

所以我尝试安装 python2.6 和 libpython2.6。得到下面的

python2.6 is already the newest version.

libpython2.6 is already the newest version.

我现在该怎么办?

【问题讨论】:

  • 这似乎是 Debian 用户的问题,而不是 Perl 的问题。
  • 是获取python.h的问题,还是安装程序找不到的问题?
  • 据我所知 Python.h 带有 python-dev 包。当我尝试安装 python-dev.它没有像“已安装软件包”之类的抱怨。我试图找到 Python.h 并没有得到任何结果。所以我认为我的机器中没有 Python.h。

标签: perl debian


【解决方案1】:

尝试安装包含库和头文件的包。使用 apt-cache 查找包名。示例:

$ apt-cache search python | grep dev
# apt-get install python2.7-dev

*或者你的Python对应版本。

现在尝试使用 cpan 而不是 apt-get 安装模块:

# cpan Inline::Python

【讨论】:

  • 看起来apt-get install Inline::Python 已经在使用cpan,所以这和他已经尝试过的一样。
  • 我有一个错字。我试过 cpan Inline::Python。不 apt-get 更新它。对不起,我的错。
猜你喜欢
  • 2012-05-17
  • 1970-01-01
  • 1970-01-01
  • 2018-03-15
  • 1970-01-01
  • 1970-01-01
  • 2012-07-12
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多