Giter Site home page Giter Site logo

Upgrade PHP version about puppet-php HOT 6 CLOSED

jippi avatar jippi commented on June 29, 2024
Upgrade PHP version

from puppet-php.

Comments (6)

jippi avatar jippi commented on June 29, 2024

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.

franz-josef-kaiser avatar franz-josef-kaiser commented on June 29, 2024

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.

franz-josef-kaiser avatar franz-josef-kaiser commented on June 29, 2024

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.

jippi avatar jippi commented on June 29, 2024

then using ensure => '5.3.10-1ubuntu3.11' should work

from puppet-php.

jippi avatar jippi commented on June 29, 2024

else, you need apt-cache policy php5_5 or whatever the base package is called and modify accordingly

from puppet-php.

franz-josef-kaiser avatar franz-josef-kaiser commented on June 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.