Apt get install php7.1-dev extension doesn't work

14,964
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.1-dev

This is tested and It works perfectly

Share:
14,964
COil
Author by

COil

My name is COil (Loïc). I live in France in both Lille and Paris cities (depending on the projects I work on). 😊 I am a php and symfony developer since 2006 (as of Symfony 0.6.0 😮), I have been working every day with it ever since then, in many many many projects. I am now working as a freelance as of 2011. If you like Symfony, be sure to check out my blog. I have also developed several side projects: Strangebuzz.com: It's my PHP/Symfony blog. 💬 Tokeeen.com: It's a habit tracker. ✅ MyEmojis.best: Allows you to create a list of your favourites emojis. 👻 Pomodoro.fun: Allows you to track your Pomodoro sessions with a simple interface. 🍅 symfony Addicted? For sure! 😜 I try to contribute to open-source projects when I can find the time. Check out my Github. See you. 😉

Updated on September 18, 2022

Comments

  • COil
    COil over 1 year

    I am running Ubuntu 17.04 with PHP 7.1, I am trying to install the PHP dev extension but it isn't found:

    [17:21:43] @Z240:~/workspace/api$ sudo apt install php7.1-dev
    Lecture des listes de paquets... Fait
    Construction de l'arbre des dépendances       
    Lecture des informations d'état... Fait
    E: Impossible de trouver le paquet php7.1-dev
    E: Couldn't find any package by glob 'php7.1-dev'
    E: Impossible de trouver de paquet correspondant à l'expression rationnelle « php7.1-dev »
    

    Here is the list of installed installed extensions:

    [17:21:42] @Z240:~/workspace/api$ sudo apt-cache pkgnames | grep php7.1
    php7.1-xml
    php7.1-mbstring
    php7.1-readline
    php7.1-zip
    php7.1-mysql
    php7.1
    php7.1-sqlite3
    php7.1-opcache
    php7.1-json
    php7.1-curl
    php7.1-ldap
    php7.1-bz2
    php7.1-cli
    php7.1-common
    php7.1-mcrypt
    php7.1-gd
    

    I don't understand why it isn't available. It should be part of the default packages.

    [Edit] Weird: when trying to install phpize, apt-get suggest me to install php7.0-dev even I use 7.1:

    [17:33:12] @Z240:~/workspace/api$ php -v PHP 7.1.11-1+ubuntu17.04.1+deb.sury.org+1 (cli) (built: Oct 27 2017 13:50:28) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.11-1+ubuntu17.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies with blackfire v1.18.2~linux-x64-non_zts71, https://blackfire.io, by SensioLabs

    [17:33:22] @Z240:~/workspace/api$ phpize Le programme « phpize » n'est pas encore installé. Vous pouvez l'installer en tapant : sudo apt install php7.0-dev

  • COil
    COil about 6 years
    3 first steps are OK, but on the last I get: "Impossible de trouver le paquet php7.1-dev" : "impossible to find the php7.1-dev packet". So me I have a configuration problem elsewhere.
  • Mammadali Alizadeh
    Mammadali Alizadeh about 6 years
    Php installation and configuration may be incorrect.Please uninstall php by (sudo apt-get purge php7.*) and install it again (sudo apt-get install php7.1 php7.1-cli php7.1-common php7.1-json php7.1-opcache php7.1-mysql php7.1-mbstring php7.1-mcrypt php7.1-zip php7.1-fpm)
  • Vishwas Nahar
    Vishwas Nahar almost 5 years
    giving this E: Unable to locate package php7.1-dev