83720

How do I upgrade from PHP 7.0 to 7.3 on google cloud platform?

<h3>Question</h3>

I am running the Wordpress multisite click to deploy on the compute engine.

Operating system Debian 9.8 Package contents Apache 2.4.25 Google-Fluentd 1.6.9 MySQL-Client 5.7.26 MySQL-Server 5.7.26 PHP 7.0.33 Stackdriver-Agent 5.5.2 WP-CLI 2.2.0 WordPress 5.1.1 phpMyAdmin 4.6.6

I would like to upgrade PHP to 7.3


<h3>Answer1:</h3>

You can use a third-party repository to install php7.3

apt-get install ca-certificates apt-transport-https wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add - echo "deb https://packages.sury.org/php/ stretch main" | sudo tee /etc/apt/sources.list.d/php.list apt-get update apt-get install php7.3
<h3>Answer2:</h3>

You may follow this instructions on how to update your php version from 7.0 to 7.3.

For Debian:

$ sudo apt install apt-transport-https lsb-release

$ sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg # Download the signing key

$ sudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' # Add Ondrej's repo to sources list.

$ sudo apt update

$ sudo apt-get install php7.3

To check the current version after the installation:

$ php -v

For Ubuntu:

$ sudo add-apt-repository ppa:ondrej/php # Press enter to confirm.

$ sudo apt-get update

$ sudo apt-get install php7.3

If you encounter the error below during installation, you may execute the command "$ sudo rm /var/lib/dpkg/lock" then try installing the php7.3 again.

E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)

E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

Hope this information helps.

来源:https://stackoverflow.com/questions/56316056/how-do-i-upgrade-from-php-7-0-to-7-3-on-google-cloud-platform

Recommend

  • Watching external variable in AngularJS?
  • Adapt class containing a string member as synthesized attribute
  • What's the point of naming function expressions if you can't really reference them by the
  • Always execute Code and the end of a python script
  • Switch Branch/Tag with nodegit
  • How to pin parse relation data in local data store?
  • Subset by first and last value per group
  • Unable to “List channel messages” on Azure AD Graph API Beta
  • how to extract short date from a full date date string?
  • Arabic characters doesn't show properly in JavaScript
  • PHP Parse error: syntax error, unexpected end of file [closed]
  • torchLevel KVO - iOS
  • Express - Uncaught TypeError: Cannot read property 'prototype' of undefined, request.js 31
  • How can I show more details of one marker?
  • Getting the recepient count from email sent in Android
  • iPad launch image problem
  • How to process future stream to create an instance of class with list property
  • how do I array from a GET request function in viewdidload function in swift
  • How do I get the Last Insert Id from a JayData transaction?
  • How to change tabs width in material UI
  • Bounding csv data to topojson path - cloropleth
  • jquery hide columns in table based on dropdown select
  • Box shadow not working in microsoft edge
  • Processing dynamic MP3 URL
  • How to run python3.7 based flask web api on azure
  • Window-select multiple artists and drag them on canvas
  • How to use grep to output unique lines of code from a file?
  • Is there a way to convert all existing table data to UTF8 collation?
  • C++ Time measurement of functions
  • Adding custom message on Thank You page by shipping method
  • Identifying dates in strings using NLTK
  • Saving CLLocation error: Mutating method sent to immutable object
  • async GET request with body from browser
  • Opening tel: links from UIWebView
  • Getting/building the SQL (with parameters) from NHibernate 3.2
  • iOS App crashed com.apple.root.background-qos
  • Stacked bar chart with continuous time-axis as x-axis