error installing Composer on linux

Asked

Viewed 21 times

-1

I changed some things in Composer-setup.php, to try to force the installation and cheat some ifs, but generated this error

The zlib extension is not loaded, this can slow down Composer a lot.
If possible, install it or recompile php with --with-zlib

The php.ini used by your command-line PHP is: /opt/lampp/etc/php.ini
If you can not modify the ini file, you can also run `php -d option=value`
 to modify ini values on the fly. You can use -d multiple times.

the path of php.ini was I who set in the variable, good as the error already says ta missing the zlib I already installed but if you want to give hint of how to install and welcome, but focus on how I can tell php pro where the zlib is installed or know what I should do to make it detect the zlib, and about the directory path '/opt/.. etc' wondered how I can put it in the path permanently

1 answer

-1

well I’ll answer my question myself, all this error was happening because I have php8 installed on my machine and to install the Composer needs to run by the terminal and where I was going wrong, in my case I am using xampp as a server and have to run php from xampp

Type: if executed php -m in the terminal

will run php that is installed on my machine, not xampp if you want to run php from xampp type export PATH='/opt/lampp/bin' here and the path of your php executable...

then can a php -m and Voce will use the php of xampp normally

but remember when closing the terminal the path placed in the PATH will be forgotten and Voce will have to do again if you want to stay using php on the terminal, my system and linux Mint, if it helped you leave your comment...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.