Drupal8TwigC extension installation problems

Source: Internet
Author: User
Tags zip extension
Installation on the official website may not work in English. I don't quite understand the official website installation address: twig.sensiolabs.orgdocinstallation.html {code ...} centos7 installation successful follow this way to get half a day not successful, and finally in centos7 install php56-twig on O...

I may not be able to understand the English proficiency when installing the official website.

Official website installation

Official Address: http://twig.sensiolabs.org/doc/installation.html

$ Composer require twig/twig :~ 1.0 add the following code to php. ini: extension = twig. so # For Unix systems
Centos 7 is successfully installed.

In this way to get half a day failed, and finally in centos7 to install the php56-twig is OK

$ sudo yum install php56u-twig

Php56u is the php version I installed on centos7.
If other versions are used, you can find other corresponding twig extension versions.

Ubuntu installation-failed

Ubuntu version: Ubuntu 14.04.4 LTS
Php version: PHP 7.0.8-3 + deb.sury.org ~ Trusty + 1

Problem 1: An error occurred while installing the composer method on the official website.
$ composer require twig/twig:~1.0

I have found many failures and I don't know how to solve them? Problem 2: The ubuntu php-twig extension installation package cannot be found

Many versions of php-twig can be found in centos7, but none of utuntu can be found.
I wonder if there are other ubuntu resource packages or other installation methods.

Question 3: ubuntu php7 Twig C extension installation other solutions supplementary question pear installation Twig C extension error
$ pear install twig/CTwig

Reply content:

I may not be able to understand the English proficiency when installing the official website.

Official website installation

Official Address: http://twig.sensiolabs.org/doc/installation.html

$ Composer require twig/twig :~ 1.0 add the following code to php. ini: extension = twig. so # For Unix systems
Centos 7 is successfully installed.

In this way to get half a day failed, and finally in centos7 to install the php56-twig is OK

$ sudo yum install php56u-twig

Php56u is the php version I installed on centos7.
If other versions are used, you can find other corresponding twig extension versions.

Ubuntu installation-failed

Ubuntu version: Ubuntu 14.04.4 LTS
Php version: PHP 7.0.8-3 + deb.sury.org ~ Trusty + 1

Problem 1: An error occurred while installing the composer method on the official website.
$ composer require twig/twig:~1.0

I have found many failures and I don't know how to solve them? Problem 2: The ubuntu php-twig extension installation package cannot be found

Many versions of php-twig can be found in centos7, but none of utuntu can be found.
I wonder if there are other ubuntu resource packages or other installation methods.

Question 3: ubuntu php7 Twig C extension installation other solutions supplementary question pear installation Twig C extension error
$ pear install twig/CTwig

I have never used twig, but from your perspective, it does not actually fail.
The error is that php does not install the zip extension, and the system does not install the unzip command, so it cannot decompress the downloaded zip file (I guess this is a zip of an OK binary file)
But later it tries to install (Now trying to download from source)
Therefore, the installation should be successful through source code installation.

The first point is obviously that there are no zip or unzip commands. you can try to install

sudo apt-get install zip

But what I want to say is that you do not actually need to use composer to upgrade from v1.23 to v1.24. unless you are sure that it fixes your current problems, otherwise, it does not make much sense.

C extension installation
We recommend that you use pear for installation. Have you tried it?

pear channel-discover pear.twig-project.orgpear install twig/CTwig

Whether to install C extension is only a matter of efficiency optimization. even if you do not install C extension, you can install C extension after the project is launched. Maybe your online server is centos.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.