I've started using a library that requires xmlwriter PHP extension, and it seems like it is not installed on my server.

How can I install it?

I tried this:

sudo yum install libxml2

but the result is:

There are no enabled repos.

Is there another way to install it, for example using apt-get? Or how can I install it?


I did it with:

sudo apt-get install php-xml
sudo service apache2 restart

This confirms xmlwriter is installed:

php -i | grep "xml"

The package manager yum is not used on debian distros like Ubuntu. It's used on Fedora and RHEL. :)

What @user838550 wrote should work. If you've got 5.6 running use sudo apt install php5.6-xml

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy