# Ubuntu 14.4 + php7 + gettext = living hell

**URL:** <https://discuss.circleci.com/t/ubuntu-14-4-php7-gettext-living-hell/4070>\
**Category:** Build Environment\
**Tags:** trusty, circle-yml, php\
**Created:** [May 18, 2016, 2:19pm UTC](https://discuss.circleci.com/t/ubuntu-14-4-php7-gettext-living-hell/4070 "2016-05-18T14:19:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![canfiax](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@canfiax](https://discuss.circleci.com/u/canfiax)\
**Post date:** [May 18, 2016, 2:19pm UTC](https://discuss.circleci.com/t/ubuntu-14-4-php7-gettext-living-hell/4070/1 "2016-05-18T14:19:21Z")

</div>

We have been fighting to install gettext on a php7 build. But so far what we have concluded: gettext is not installed, and needs to enabled in the .ini file.

I have successfully found the .ini file PHP use, and I have uncommented this line:

```
extension=php_gettext.dll

```

However, then I receive the following warning:

```
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/circleci/php/7.0.2/lib/php/extensions/no-debug-non-zts-20151012/php_gettext.dll' - /opt/circleci/php/7.0.2/lib/php/extensions/no-debug-non-zts-20151012/php_gettext.dll: cannot open shared object file: No such file or directory in Unknown on line 0

```

What am I doing wrong?

If you look a the php documentation for gettext is says: `To include GNU gettext support in your PHP build you must add the option --with-gettext[=DIR] where DIR is the gettext install directory`. However, we install the php7 using the circle.yml:

machine:  
php:  
version: 7.0.2

Any pointers in the right direction will greatly help. We’re stuck.

---

<div class="post-metadata">

**Author:** ![kimh](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/kimh/32/19_2.png) [@kimh](https://discuss.circleci.com/u/kimh)\
**Post date:** [May 19, 2016, 6:59am UTC](https://discuss.circleci.com/t/ubuntu-14-4-php7-gettext-living-hell/4070/2 "2016-05-19T06:59:21Z")

</div>

@canfiax this sounds like our php7 is built without `--with-gettext"`. Let me see if I can rebuild with the option. I’ll let you know once I rebuild the package.

---

<div class="post-metadata">

**Author:** ![canfiax](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@canfiax](https://discuss.circleci.com/u/canfiax)\
**Post date:** [May 19, 2016, 9:37am UTC](https://discuss.circleci.com/t/ubuntu-14-4-php7-gettext-living-hell/4070/3 "2016-05-19T09:37:54Z")

</div>

Nice!! Looking forward hearing from you

---

<div class="post-metadata">

**Author:** ![kimh](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/kimh/32/19_2.png) [@kimh](https://discuss.circleci.com/u/kimh)\
**Post date:** [May 20, 2016, 12:27pm UTC](https://discuss.circleci.com/t/ubuntu-14-4-php7-gettext-living-hell/4070/4 "2016-05-20T12:27:59Z")

</div>

@canfiax @lk22 I rebuilt all php with `--with-gettext` configure option. You can install use them with the following circle.yml. Please replace the version with your own.

```auto
machine:
  pre:
    - curl -s https://packagecloud.io/install/repositories/circleci/trusty/script.deb.sh | sudo bash
    - sudo apt-get install circleci-php-7.0.4=4

  php:
    version: 7.0.4

```

If this works, I can ship a new build image that preinstalls the version, so please let me know.

---

<div class="post-metadata">

**Author:** ![kimh](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/kimh/32/19_2.png) [@kimh](https://discuss.circleci.com/u/kimh)\
**Post date:** [May 21, 2016, 3:28am UTC](https://discuss.circleci.com/t/ubuntu-14-4-php7-gettext-living-hell/4070/5 "2016-05-21T03:28:20Z")

</div>

It seems the new PHP works great according to [Problem getting gettext to work on running builds](https://discuss.circleci.com/t/problem-getting-gettext-to-work-on-running-builds/3881)

I’ll ship the new build image soon.

---

<div class="post-metadata">

**Author:** ![kimh](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/kimh/32/19_2.png) [@kimh](https://discuss.circleci.com/u/kimh)\
**Post date:** [May 22, 2016, 9:26am UTC](https://discuss.circleci.com/t/ubuntu-14-4-php7-gettext-living-hell/4070/6 "2016-05-22T09:26:13Z")

</div>

Hi, I just shipped the new build image. Now you don’t have to install PHP manually to get the configure options. Please let me know if you see any problems.

---

<div class="post-metadata">

**Author:** ![lk22](https://avatars.discourse-cdn.com/v4/letter/l/f4b2a3/32.png) [@lk22](https://discuss.circleci.com/u/lk22)\
**Post date:** [November 16, 2016, 11:41am UTC](https://discuss.circleci.com/t/ubuntu-14-4-php7-gettext-living-hell/4070/7 "2016-11-16T11:41:33Z")

</div>

Hi @kimh i experience issues with installing PHP 7.0.4

i experience following: Version ‘10’ for ‘circleci-php-7.0.4’ was not found

which version should i install instead that has gettext with it?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:38am UTC](https://discuss.circleci.com/t/ubuntu-14-4-php7-gettext-living-hell/4070/8 "2018-06-18T11:38:22Z")

</div>

Closed on June 18, 2018, 11:38am UTC


