我有一个简单的.pp / puppet文件,我收到“参数提供程序失败:无效的包提供商'pip'在sis.pp:24”
这是第24行:
20 package {"numpy":
21 ensure => installed,
22 provider => pip,
23 require => Package["python-setuptools", "python-pip", "python-dev", "build-essential"]
24 }
我检查了语法错误,没有。
我猜是木偶找不到pip,我卸载并再次安装pip。使用apt-get, 这是我输入“whereis pip”时得到的结果
pip: /usr/local/bin/pip /usr/share/man/man1/pip.1.gz
我四处搜寻,发现木偶有一个pip模块,也安装了它。
但仍然对问题是什么一无所知。
当我输入“puppet apply sis.pp --debug --verbose”
时我明白了:
debug: Puppet::Type::Package::ProviderSunfreeware: file pkg-get does not exist
debug: Puppet::Type::Package::ProviderFink: file /sw/bin/fink does not exist
debug: Puppet::Type::Package::ProviderYum: file yum does not exist
debug: Puppet::Type::Package::ProviderRug: file /usr/bin/rug does not exist
debug: Puppet::Type::Package::ProviderAix: file /usr/bin/lslpp does not exist
debug: Puppet::Type::Package::ProviderPorts: file /usr/sbin/pkg_info does not exist
debug: Puppet::Type::Package::ProviderNim: file /usr/sbin/nimclient does not exist
debug: Puppet::Type::Package::ProviderRpm: file rpm does not exist
debug: Puppet::Type::Package::ProviderSun: file /usr/sbin/pkgrm does not exist
debug: Puppet::Type::Package::ProviderPortupgrade: file /usr/sbin/pkg_info does not exist
debug: Puppet::Type::Package::ProviderHpux: file /usr/sbin/swremove does not exist
debug: Puppet::Type::Package::ProviderZypper: file /usr/bin/zypper does not exist
debug: Puppet::Type::Package::ProviderFreebsd: file /usr/sbin/pkg_delete does not exist
debug: Puppet::Type::Package::ProviderUp2date: file /usr/sbin/up2date-nox does not exist
debug: Puppet::Type::Package::ProviderPkg: file /usr/bin/pkg does not exist
debug: Puppet::Type::Package::ProviderPortage: file /usr/bin/eix does not exist
debug: Puppet::Type::Package::ProviderAptrpm: file rpm does not exist
debug: Puppet::Type::Package::ProviderOpenbsd: file pkg_delete does not exist
debug: Puppet::Type::Package::ProviderUrpmi: file urpmq does not exist
Parameter provider failed: Invalid package provider 'pip' at /path/sis.pp:54
观察puppet解释器指向sis.pp文件中的多个位置,它无法处理provider => “pip”
需要帮助。我现在要尝试在puppet源中找到终端输出代码行,看看问题是什么。如果有人已经知道解决方案,那么将不胜感激。
我在ubuntu上。
答案 0 :(得分:1)
看起来pip提供程序在没有下载外部提供商的情况下在puppet pre 2.7中不可用。你使用2.7或更高版本吗?
答案 1 :(得分:1)
您的安装似乎找不到pip提供程序,而不是找不到pip可执行文件。
我猜你提到的提供商就是这个:
https://github.com/rcrowley/puppet-pip
一些可能不太清楚的事情:
可能最简单的方法是将puppet-pip提供程序作为单独的模块包含在puppet repo中,然后启用pluginsync,即
[main]
pluginsync = true
此处有更多详情http://docs.puppetlabs.com/guides/plugins_in_modules.html