1. 程式人生 > >ubuntu 使用apt-get install 安裝php5.6--php7

ubuntu 使用apt-get install 安裝php5.6--php7

使用ppa增加源:

$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:ondrej/php
$ sudo apt-get update
$ sudo apt-get install -y php7.0 php7.0-mysql php7.0-curl php7.0-json php7.0-cgi

然後可以檢視php版本:
php -v

關於php5.4–php5.6版本

$ sudo apt-get install python-software-properties
$ sudo add-apt
-repository ppa:ondrej/php $ sudo apt-get update $ sudo 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

檢視php7的擴充套件
sudo apt-cache search php7-*

或者可以原始碼安裝
1.下載php7的原始碼包
2.tar -zxvf 解壓
3.安裝一些依賴
sudo apt-get install php5-mcrypt libmcrypt-dev
sudo apt-get install libxslt-dev libxml2-dev

4./configure –prefix=/zhou.data/php/php7 –enable-maintainer-zts -with-mysqli=mysqlnd –with-pdo-mysql=mysqlnd –with-mhash –with-openssl –with-zlib –with-bz2 –with-curl –with-zlib –enable-mbstring –with-mcrypt –enable-sockets –with-xsl –enable-zip –with-pear –enable-session –enable-xml –enable-shared –enable-bcmath –enable-sysvmsg –enable-sysvsem –enable-sysvshm –enable-mbregex –enable-pcntl –with-xmlrpc
5.make && make install
6.如果報錯,缺少哪些依賴,就一次安裝即可

相關推薦

ubuntu 使用apt-get install 安裝php5.6--php7

使用ppa增加源: $ sudo apt-get install python-software-properties $ sudo add-apt-repository ppa:ondrej/php $ sudo apt-get update $ sud

ubuntu下使用apt-get install安裝的軟體的相關位置

    有時候需要配置ubuntu安裝的軟體,一般安裝軟體都是使用apt-get install。那麼安裝完後,軟體的安裝目錄在哪裡呢,可執行檔案又放在哪裡呢。    A、下載的軟體的存放位置:/var/cache/apt/archives    B、安裝後軟體的預設位置:/

Ubuntu執行sudo apt-get install安裝過程出現錯誤

Ubuntu執行sudo apt-get install安裝過程出現以下錯誤: ~$ sudo apt-get install apache2 [sudo] password for xxt: Reading package lists... Done Buil

Ubuntuapt-get install安裝軟體,顯示“E:無法定位軟體包”

問題:一般為剛裝完Linux  Ubuntu系統,若直接使用apt-get install安裝軟體,總是顯示“E:無法定位軟體包”。 解決:可能的一個原因是因為系統沒有更新軟體源,更新一下軟體源。

ubuntu apt-get install xxx時一直報錯E: Unable to locate package xxxxxxx

$ sudo add-apt-repository main $ sudo add-apt-repository universe $ sudo add-apt-repository restricted $ sudo add-apt-repository multiverse 再 sud

ubuntu apt-get解除安裝軟體無法解除安裝乾淨的解決方法(ubuntu解除安裝apache)

安裝過sudo apt-get install xxxx 安裝軟體後,總是無法解除安裝乾淨,這裡提供一個方法可以解決這個問題,大家參考使用吧 過sudo apt-get install xxxx

ubuntu apt-get install 出現無法定位軟體包...

[email protected]:/opt/tomato# apt-get install git 正在讀取軟體包列表... 完成 正在分析軟體包的依賴關係樹       正在讀取狀態資

解決ubuntu apt-get install出現E:Clould not get lock /var/lib/dpkg/lock

在vmware下ubuntu安裝svn出現如下錯誤 出現這個問題可能是有另外一個程式正在執行,導致資源被鎖不可用,可能是上次執行安裝或更新時沒有正常完成 解決辦法是使用rm命令刪除安裝快取和lib下

ubuntu中我們使用sudo apt-get install 或者dpkg -i *.deb安裝軟件時,常常提示“有未能滿足的依賴關系“,解決方法

yun 依賴庫 all OS install rop bak pkg mir 很早之前在ubuntu安裝軟件時遇到的問題,今天打開ubuntu看到了,總結如下: 在ubuntu中我們使用sudo apt-get install 或者dpkg -i *.deb安裝軟件常常提示

Ubuntu sudo apt-get install *** 無法安裝軟體

簡介 windows下安裝軟體,我們只需要雙擊EXE檔案。但在Linux下每個Linux的發行版,比如Ubuntu,都會維護一個自己的軟體倉庫,我們常用的幾乎所有軟體都在這裡面。 在Ubuntu下,維護一個源列表,源列表裡面都是一些網址資訊,這每一條網址就是一個源,這個地址指向的

ubuntuapt-get install xxx安裝錯誤:install-info E: Sub-process /usr/bin/dpkg returned an error code (1)

         當我在編譯android原始碼的時候,缺少了一個gperf,所以我執行sudo apt-get install gperf,進行安裝。但是在進行安裝的時候,出現了一個我之前沒碰到過的問題: 正在

公司網路使用代理上網在安裝 sudo apt-get install php7.0-mysql 錯誤 Hash 校驗和不符 失敗

關於類似報錯: Hash 校驗和不符 失敗 E: 有幾個軟體包無法下載,要不執行 apt-get update 或者加上 --fix-missing 的選項再試試? 以及關於 apt-get update 獲取:1 http://ip:xxxx:portxxx(這裡是你

ubuntuapt-get install的預設安裝路徑

  一、apt-get 安裝 deb是debian linus的安裝格式,跟red hat的rpm非常相似,最基本的安裝命令是:dpkg -i file.deb或者直接雙擊此檔案 dpkg 是Debian Package的簡寫,是為Debian 專門開發的套件管理系統,方便

sudo apt-get install openssh-server時提示需要安裝1:6.6p1-2ubuntu1的解決辦法(圖文詳解)

   最近,在執行 sudo apt-get install openssh-server   提示,如下。 解決辦法   先要執行 sudo apt-get install openssh-client=1:6.6.p1-2ubuntu1    

ubuntu 安裝時執行sudo apt-get install xxx出現錯誤

1  出現錯誤資訊“E:Encountered a section with no Package: header,”       解決方法: 執行“sudo rm /var/lib/apt/lists/* -vf”  和 “sudo apt-get update "可以解

Ubuntu安裝軟體sudo apt-get install時出現錯誤

1.執行命令: sudo apt-get install libncurses5-dev 2.現象: 3.分析: 通過終端安裝程式sudo apt-get install xxx時出錯:

ubuntu解除安裝php7安裝php5.6記錄

    ubuntu16.04版本從預設源安裝的php版本為7.x版本,我們都知道php7.0已經捨棄了很多舊版本的函式等內容,這對舊系統來說是致命的,那麼,我們就有了安裝舊版php的需求,而同一主機安裝兩個版本的php,如果不做配置會報錯。那麼,我們就需要:一、解除安裝ph

ubuntu 命令:sudo apt-get install mysql 安裝mysql,修改密碼總結

資料庫安裝 sudo apt-get install mysql (下載最新版本) 或者 sudo apt-get install mysql==version (下載指定版本) 登入mysql資料庫 輸入 mysql

ubuntu利用apt-get install命令安裝軟體時報錯:有另外一個程序正在使用(is another process using it)

利用apt-get install命令安裝軟體時報錯: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the

Ubuntu安裝Qt4教程(命令列方式apt-get install)

簡述 Ubuntu通過命令安裝Qt4,簡單方便快捷,注意需要聯網. 準備 修改Ubuntu的更新伺服器為中國的,預設境外伺服器速度特別的慢. 系統設定 Ubuntu系統的右上角開啟,或者在桌面左邊開啟系統設定 軟體和更新 下載自 在下載