docker中ubuntu:16.04中安裝php5.6

參考文章 https://blog.csdn.net/qq_28139021/article/details/72763878

 docker環境中缺少基礎庫:

1. apt update
2. apt install vim openssh-server inetutils-ping net-tools
3. apt install  software-properties-common
4. 從其他機器拷貝 'locale-gen'
5. locale-gen en_US.UTF-8
6. LC_ALL=en_US.UTF-8 add-apt-repository -y ppa:ondrej/php

    如果上面報錯:

     W: GPG error: http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4F4EA0AAE5267A6C
W: The repository 'http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.

則運行   apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C

7. apt update

8. apt-get -y install php5.6 php5.6-mcrypt php5.6-mbstring php5.6-curl php5.6-cli php5.6-mysql php5.6-gd php5.6-intl php5.6-xsl php5.6-zip

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章