Comments (6)
Hi
try to run apt-cache policy php5
and show me the output
Usually the ensure
is in the format like php5_5.4.9-4ubuntu2
without the .deb part
from puppet-php.
Hi and thanks for getting here so fast :)
This is what I got back:
vagrant@wp:~$ apt-cache policy php5
php5:
Installed: (none)
Candidate: 5.3.10-1ubuntu3.11
Version table:
5.3.10-1ubuntu3.11 0
500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main i386 Packages
500 http://security.ubuntu.com/ubuntu/ precise-security/main i386 Packages
5.3.10-1ubuntu3 0
500 http://us.archive.ubuntu.com/ubuntu/ precise/main i386 Packages
About the package: Still unable to locate the package
Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
Error: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold --force-yes install php=php5_5.4.9-4ubuntu2_all' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package php
Wrapped exception:
Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold --force-yes install php=php5_5.4.9-4ubuntu2_all' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package php
Error: /Stage[main]/Main/Node[wp]/Package[php]/ensure: change from purged to php5_5.4.9-4ubuntu2_all failed: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPk
g::Options::=--force-confold --force-yes install php=php5_5.4.9-4ubuntu2_all' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package php
from puppet-php.
It seems my main problem is, that I can't figure out where I could retrieve a valid package from. Is this assumption correct?
from puppet-php.
then using ensure => '5.3.10-1ubuntu3.11'
should work
from puppet-php.
else, you need apt-cache policy php5_5
or whatever the base package is called and modify accordingly
from puppet-php.
Thanks a lot for your help Christian.
This is how I (finally) did it: First, I added the puppetlabs/apt
module to have a more convenient way to add the packages.
include apt, php, php::params
package { 'php5':
ensure => latest,
provider => apt,
}
class { [ 'php::dev', 'php::cli' ]:
ensure => installed
}
# Just to make sure
exec { 'python-software-properties':
command => 'apt-get install python-software-properties -y',
}
# Fetch the newest PHP 5.4.XX version
apt::ppa { 'ppa:ondrej/php5-oldstable': }
# Fetch the newest PHP 5.5.XX version
apt::ppa { 'ppa:ondrej/php5': }
# Set order
Class['Apache']
-> Class['Apt']
-> Exec['python-software-properties']
-> Class['Php::dev']
-> Class['Php::cli']
Again: Thanks a lot!
P.s.: For later readers: I first head apt-get update
running before a new package gets installed. This resulted in having loads of problems with Apache files getting deleted, but not added. So better do it just once and don't do any of the following:
# Execute apt-update before any new package gets installed
# Currently deactivated as Apache got files deleted and crashed
# class { 'apt':
# always_apt_update => true,
# }
# exec { 'apt-update':
# command => '/usr/bin/apt-get update',
# }
# Exec['apt-update'] -> Package <| |>
from puppet-php.
Related Issues (20)
- Invalid resource type ini_setting HOT 2
- (Plan to) release to the forge HOT 1
- php.ini - No such file or directory HOT 8
- php::apache::config doesn't work HOT 1
- Must pass package_provider to Class[Php::Fpm::Package] HOT 4
- Configuration does not work HOT 2
- Must pass provider to Class[Php::Fpm::Service] HOT 4
- [discuss] what needs to be done for a 1.0.0 release HOT 18
- Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type php::fpm::conf HOT 1
- extensions installed but not enabled HOT 1
- Be able to specify version for pear and pecl package installation. HOT 1
- Be able to install Beta pear and / or pecl package HOT 3
- Errors for all module configs HOT 3
- apt::source not working HOT 6
- Error: service php5-fpm restart returned 1 instead of one of [0] HOT 2
- puppet 4 compatibility HOT 4
- Disabling of listen_allowed_clients fpm pool directive is broken
- Support for PHP7 HOT 9
- PHP-FPM pool.d directory purge
- Should move params to one big file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-php.