D
D
Denis2020-01-04 01:33:15
PHP
Denis, 2020-01-04 01:33:15

Composer not working asks for xmlwrite?

Today I installed Ubuntu 18.04 on a new hard drive , installed php , composer , installed the necessary programs. And finally, I cloned the repository, I was going to finish the project again. I am writing and composer updatesee the error the requested PHP extension xmlwriter is missing from your system. I googled and found what to do like this:

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

made.
Uploading again composer update!!! On the fifth line, the computer suddenly hung up, and only a reboot helped.
Try again composer update, doesn't work, still requires the requested PHP extension xmlwriter is missing from your system. I just haven’t tried it, I don’t want to load it, and I write the same thing all the time. I write php -i | grep "xml"back
/etc/php/7.2/cli/conf.d/15-xml.ini,
/etc/php/7.2/cli/conf.d/20-simplexml.ini,
/etc/php/7.2/cli/conf.d/20-xmlreader.ini,
/etc/php/7.2/cli/conf.d/20-xmlwriter.ini,
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
libxml
mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml\+xml) => ^(text/|application/xhtml\+xml)

I'm already tired of fighting with him, tell me who knows how to fix this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis, 2020-01-04
@Drumsid

Everything turned out to be easier. I first demolished everything with sudo apt-get purge php7. * Then I reinstalled php + extensions and immediately everything connected ... mystic ..
I noticed that before it didn’t work, in some files like 20-xmlwriter.ini at /etc/php/7.2/cli/conf.d was no entries like
; configuration for php xml module
; priority=20
extension=xmlwriter.so
after reinstalling php and packages, the entries appeared and everything worked.

B
bkosun, 2020-01-04
@bkosun

After installing php-xml, you need to enable the extension in the php.ini file
https://www.php.net/manual/en/dom.setup.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question