Rafaelfc/pear in Puppet with Hiera - puppet

I need to install FirePHPCore with PEAR in Puppet infrastructure.
Docs give an example
include pear
# If no version number is supplied, the latest stable release will be
# installed. In this case, upgrade PEAR to 1.9.2+ so it can use
# pear.drush.org without complaint.
pear::package { "PEAR": }
pear::package { "Console_Table": }
# Version numbers are supported.
pear::package { "drush":
version => "4.5.0",
repository => "pear.drush.org",
}
I implement it by this way
classes:
- pear
pear::package:
'PEAR':
pear::package:
'Console_Table':
pear::package:
'FirePHPCore':
repository : 'pear.firephp.org'
But it doesn't work. I see errors on agent:
Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install {"FirePHPCore"=>{"repository"=>"pear.firephp.org"}}' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package {"FirePHPCore"=>{"repository"
Error: /Stage[main]/Pear/Package[{"FirePHPCore"=>{"repository"=>"pear.firephp.org"}}]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install {"FirePHPCore"=>{"repository"=>"pear.firephp.org"}}' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package {"FirePHPCore"=>{"repository"
Looks like it interpret 'FirePHPCore': as "FirePHPCore"=>.
Can anyone understand what's wrong?

So, looks like Rafaelfc/pear is broken, the simpliest way to install pear module via Puppet can be looks like this code:
exec { "install FirePHP":
command => "/usr/bin/pear channel-discover pear.firephp.org && /usr/bin/pear install firephp/FirePHPCore",
onlyif => "/usr/bin/test `/usr/bin/pear list -c firephp | grep -c Fire` -eq 0",
}

Related

Trouble with applying puppetdb module

I'm having some trouble setting up the puppetdb module. When I try to apply the single node manifest that is recommended I get this error:
Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install postgresql-9.6' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package postgresql-9.6
E: Couldn't find any package by glob 'postgresql-9.6'
E: Couldn't find any package by regex 'postgresql-9.6'
Error: /Stage[main]/Postgresql::Server::Install/Package[postgresql-server]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install postgresql-9.6' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package postgresql-9.6
E: Couldn't find any package by glob 'postgresql-9.6'
E: Couldn't find any package by regex 'postgresql-9.6'
This is on Ubuntu 18.04.03

perf version not matching with my kernel version

I'm currently working on Raspberry pi zero.
When i write:
perf --version
/usr/bin/perf: line 13: exec: perf_4.14: not found E: linux-perf-4.14
is not installed.
when i do:
sudo apt-get install linux-perf
Then:
linux-perf is already the newest version (4.9+80+deb9u4+rpi1)
0 upgraded, 0 newly installed, 0 to remove and 216 not upgraded.
sudo apt-get install perf_4.14
E: Unable to locate package perf_4.14
E: Couldn't find any package by glob
'perf_4.14' E: Couldn't find any package by regex 'perf_4.14'
sudo apt-get install linux-tools-common linux-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-tools-common
sudo apt-get install linux-tools-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-tools-4.14.79
E: Couldn't find any package by glob 'linux-tools-4.14.79'
E: Couldn't find any package by regex 'linux-tools-4.14.79'
Please help me in this!
Thanks
I encountered the same problem in the k8s pod environment.
Install perf in Debian GNU/Linux 10:
sudo apt install linux-perf
Tried to use perf, but reported an error:
:~/perf-tools$ sudo perf -h
/usr/bin/perf: line 13: exec: perf_5.4: not found
E: linux-perf-5.4 is not installed.
After research, I found that /usr/bin/perf used uname -r to get the linux kernel version of the host instead of the version of the container.
So I solved it by renaming it.
sudo cp /usr/bin/perf_4.19 /usr/bin/perf_5.4

Why does the update command display the same ppa?

I was installing atom on Ubuntu 18.04.1 using the command:-
sudo apt-get install atom
I stopped the installation process and now whenever I run the command:-
sudo apt update
The following is the output:-
Hit:1 http://ppa.launchpad.net/webupd8team/atom/ubuntu bionic InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Whenever I try to install Atom again, I get the following output:-
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
atom : Depends: gvfs-bin but it is not installable
E: Unable to correct problems, you have held broken packages.
Now, whenever I try to install a package from the terminal using
sudo apt-get install <package-name>
I get some output showing: This package has no installation candidate.
For example, if I install rpm, the output is:-
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package rpm is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'rpm' has no installation candidate
All this has been happening since the day I terminated the atom installation.
Can anyone help me with this?

How to install software-properties-gtk package in python?

Whenever I tried to install new package,
"The package software-properties-gtk needs to be reinstalled, but I can't find an archive for it."
this error is occurred.
When i ran this command: "sudo apt-get install celery"
following error is occurred:
"Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package software-properties-gtk needs to be reinstalled, but I can't find an archive for it."

E: Package 'gdb-arm-linux-gnueabi' has no installation candidate

I try to install gdb-ARM for cross compile on my ubuntu 14.04 x86 architecture . I want to debug a program on my target with an ARM architecture.I tried this command :
sudo apt-get install gdb-arm-linux-gnueabi
I got this error :
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package gdb-arm-linux-gnueabi is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'gdb-arm-linux-gnueabi' has no installation candidate
any help please ?
You may want to try sudo apt install binutils-mips64el-linux-gnuab or sudo apt install gdb-arm-none-eabi

Resources