# Erreur lors de l'installation de memcache

**URL:** <https://www.debian-fr.org/t/erreur-lors-de-linstallation-de-memcache/77514>\
**Category:** Support Debian\
**Created:** [Septembre 12, 2018, 1:16 UTC](https://www.debian-fr.org/t/erreur-lors-de-linstallation-de-memcache/77514 "2018-09-12T13:16:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dinjer](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/d/c68b51/32.png) [@dinjer](https://www.debian-fr.org/u/dinjer)\
**Post date:** [Septembre 12, 2018, 1:16 UTC](https://www.debian-fr.org/t/erreur-lors-de-linstallation-de-memcache/77514/1 "2018-09-12T13:16:48Z")

</div>

Bonjour j’essai d’installer memcache et j’obtient cette erreur.

```nohighlight
ERROR: `/tmp/pear/temp/memcache/configure --with-php-config=/usr/bin/php-config --enable-memcache-session=yes' failed

```

j’utilise debian 9  
Merci

---

<div class="post-metadata">

**Author:** ![littlejohn75](https://www.debian-fr.org/user_avatar/www.debian-fr.org/littlejohn75/32/3840_2.png) [@littlejohn75](https://www.debian-fr.org/u/littlejohn75)\
**Post date:** [Septembre 12, 2018, 8:02 UTC](https://www.debian-fr.org/t/erreur-lors-de-linstallation-de-memcache/77514/2 "2018-09-12T20:02:26Z")

</div>

> [@dinjer](#):
>
> Bonjour j’essai d’installer memcache

Si je lance la commande

```auto
fp2@debpacha:/data/download$ aptitude search memcache | wc
     58 519 4244
fp2@debpacha:/data/download$ 

```

je vois qu’il y a 58 paquets (binaires) dont le nom contient `memcache` mais qu’il n’y a pas de paquet nommé `memcache`

> [@dinjer](#):
>
> t j’obtient cette erreur.
> 
> ```auto
> ERROR: `/tmp/pear/temp/memcache/configure --with-php-config=/usr/bin/php-config --enable-memcache-session=yes' failed
> 
> ```
> 
> j’utilise debian 9

Est-ce que vous installiez depuis l’un des 58 paquets ou plutôt depuis des sources téléchargées par un autre moyen que apt,apt-get, aptitude … ?  
Dans le second cas, pourrait-on savoir pourquoi (voyant une reférence à php dans le message d’erreur) un des paquets `php-memcache` ou `php-memcached`ne conviendraient pas ?

Cordialement,  
Regards,  
Mit freundlichen Grüßen,  
مع تحياتي الخالصة

* * *

F. Petitjean

Il vaut mieux avoir vécu vingt-cinq jours comme un tigre qu’un millénaire comme  
un mouton.  
Proverbe tibétain

---

<div class="post-metadata">

**Author:** ![Verner](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/v/34f0e0/32.png) [@Verner](https://www.debian-fr.org/u/Verner)\
**Post date:** [Septembre 12, 2018, 8:27 UTC](https://www.debian-fr.org/t/erreur-lors-de-linstallation-de-memcache/77514/3 "2018-09-12T20:27:42Z")

</div>

```
$ apt-cache search memcache|grep ^m
memcachedb - moteur pour un stockage permanent utilisant le protocole memcache
memcached - high-performance memory object caching syste
```

---

<div class="post-metadata">

**Author:** ![dinjer](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/d/c68b51/32.png) [@dinjer](https://www.debian-fr.org/u/dinjer)\
**Post date:** [Septembre 13, 2018, 9:01 UTC](https://www.debian-fr.org/t/erreur-lors-de-linstallation-de-memcache/77514/4 "2018-09-13T09:01:55Z")

</div>

je ne comprends pas vos réponses.  
je fais mes installations depuis apt-get et la version du php utilisée est 7.0  
Merci

---

<div class="post-metadata">

**Author:** ![littlejohn75](https://www.debian-fr.org/user_avatar/www.debian-fr.org/littlejohn75/32/3840_2.png) [@littlejohn75](https://www.debian-fr.org/u/littlejohn75)\
**Post date:** [Septembre 13, 2018, 9:05 UTC](https://www.debian-fr.org/t/erreur-lors-de-linstallation-de-memcache/77514/5 "2018-09-13T09:05:02Z")

</div>

> [@dinjer](#):
>
> je fais mes installations depuis apt-get

Pourriez-vous copier/coller la commande exacte que vous tapez et les retours complets ?

Cordialement,  
Regards,  
Mit freundlichen Grüßen,  
مع تحياتي الخالصة

* * *

F. Petitjean

« Moi, lorsque je n’ai rien à dire, je veux qu’on le sache. » (R. Devos)

---

<div class="post-metadata">

**Author:** ![dinjer](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/d/c68b51/32.png) [@dinjer](https://www.debian-fr.org/u/dinjer)\
**Post date:** [Septembre 13, 2018, 9:48 UTC](https://www.debian-fr.org/t/erreur-lors-de-linstallation-de-memcache/77514/6 "2018-09-13T09:48:22Z")

</div>

Pardon c’est plutôt `pecl install memcache` que `apt-get install memcache`

```nohighlight
root@PcTest:/etc# pecl install memcache
downloading memcache-2.2.7.tgz ...
Starting to download memcache-2.2.7.tgz (36,459 bytes)
..........done: 36,459 bytes
11 source files, building
running: phpize
Configuring for:
PHP Api Version: 20151012
Zend Module Api No: 20151012
Zend Extension Api No: 320151012
Enable memcache session handler support? [yes] : building in /tmp/pear/temp/pear-build-rootPNIZo8/memcache-2.2.7
running: /tmp/pear/temp/memcache/configure --with-php-config=/usr/bin/php-config --enable-memcache-session=yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20151012
checking for PHP installed headers prefix... /usr/include/php/20151012
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable memcache support... yes, shared
checking whether to enable memcache session handler support... yes
checking for the location of ZLIB... no
checking for the location of zlib... configure: error: memcache support requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are located
ERROR: `/tmp/pear/temp/memcache/configure --with-php-config=/usr/bin/php-config --enable-memcache-session=yes' failed

```

---

<div class="post-metadata">

**Author:** ![littlejohn75](https://www.debian-fr.org/user_avatar/www.debian-fr.org/littlejohn75/32/3840_2.png) [@littlejohn75](https://www.debian-fr.org/u/littlejohn75)\
**Post date:** [Septembre 13, 2018, 3:29 UTC](https://www.debian-fr.org/t/erreur-lors-de-linstallation-de-memcache/77514/7 "2018-09-13T15:29:02Z")

</div>

> [@dinjer](#):
>
> Pardon c’est plutôt `pecl install memcache` que `apt-get install memcache`

D’où sort cette commande `pecl` ?  
D’après [la page sur le paquet php-pear](https://packages.debian.org/stretch/all/php-pear/filelist) il semblerait que `/usr/bin/pecl` fasse partie des fichiers installés avec le paquet `php-pear`.  
J’ai du mal à comprendre cette fascination pour ces systèmes d’installation et distribution de logiciels fortement intégré à un langage ou écosystème particulier ( PEAR pour php, easy-install/pip pour python, même Tex/latex a un système, ruby gems et je ne parle pas de l’écosystème JavaScrip/Node.js)

> [@dinjer](#):
>
> ```auto
> root@PcTest:/etc# pecl install memcache
> downloading memcache-2.2.7.tgz ...
> Starting to download memcache-2.2.7.tgz (36,459 bytes)
> ..........done: 36,459 bytes
> 
> ```

Etes-vous bien conscient des risques que vous encourrez en lançant avec le compte `root` une commande qui télécharge des informations depuis internet et procède à des modifications sur votre sysstème Debian/GNU/linux sans aucune vérification ? (intégrité de la transmission, clé pour chaîne de confiance, …)  
Dans le cas précis qui nous intéresse, quel est l’intérêt de passer par `pecl` si ce n’est chercher les ennuis ?  
Pour éviter ce genre de tentations

```auto
sudo aptitude purge php-pear

```

Ou bien dans le cas d’un paquet PEAR pas encore dans debian

```auto
sudo apt install debpear

```

Extrait de la description de `debpear`

```auto
The goal of debpear isn't to replace the real work of a Debian maintainer, but
 rather to allow its users to quickly build and install a PEAR package in a
 clean, Debian way, when this PEAR package doesn't exist in Debian yet.

```

Pour la peine, proposez une traduction en français de cette description 😀

Cordialement,  
Regards,  
Mit freundlichen Grüßen,  
مع تحياتي الخالصة

* * *

F. Petitjean  
Ingénieur civil du Génie Maritime.

Concierge qui roule, ne s’arrête qu’au bas de l’escalier.  
Les proverbes philosophiques du Professeur Choron

---

<div class="post-metadata">

**Author:** ![Archinformatique](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/a/e19b73/32.png) [@Archinformatique](https://www.debian-fr.org/u/Archinformatique)\
**Post date:** [Septembre 13, 2018, 3:42 UTC](https://www.debian-fr.org/t/erreur-lors-de-linstallation-de-memcache/77514/8 "2018-09-13T15:42:53Z")

</div>

Normalement pour installer `memcached`

```nohighlight
apt-get -y install memcached netcat

```

Pour vérifier

```nohighlight
ps -ef | grep -i memcached

```

Et pour une installation du module avec PHP

```nohighlight
apt-get install -y php php-memcached

```

Puis redémarage

```nohighlight
systemctl restart memcached
systemctl restart apache2

```

Et vérification

```nohighlight
vi /var/www/html/info.php

```

ou

```nohighlight
nano /var/www/html/info.php

```

ajouter

```nohighlight
phpinfo(); ?&gt;

```

et dans un navigateur

```nohighlight
http://votre adresse ip/info.php

```

Qui doit normalement afficher en autre quelque chose comme cela :

```nohighlight
/etc/php/7.0/apache2/conf.d/25-memcached.ini

```

Est-ce la manière dont vous avez pratiqué ?
