Tuesday, June 7, 2022

Steps to install Composer ubuntu 20.4

 

sudo apt-get remove composer
  • Download the installer to the current directory
    • php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

       
  • Verify the installer SHA-384, which you can also https://getcomposer.org/download/
    php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
  • Run the installer
    • php composer-setup.php 
       
      Remove the installer

php -r "unlink('composer-setup.php');"
 sudo apt install composer
Refderences:
https://getcomposer.org/download/ 
 
sudo composer self-update 
-------------------------------------------------------------------------------
composer install error
 
  1. sudo apt install wget php-cli php-zip unzip
  2. php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
  3. HASH="$(wget -q -O - https://composer.github.io/installer.sig)"
  4. php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
Installer verified
  1. sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
All settings correct for using Composer
Downloading...
Composer (version 2.0.14) successfully installed to: 
/usr/local/bin/composer
Use it: php /usr/local/bin/composer
 

Wednesday, June 1, 2022

To remove packages that have dpkg congigure issues

 REMOVE

sudo apt-get autoremove "NAME OF PACKAGE HERE"
 RECONFIGURE
sudo dpkg-reconfigure -phigh -a
 
  

Install PHP 7.4 in ubuntu 20.04

1)sudo apt update


2)sudo apt install php7.4


3)sudo apt install php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap php7.4-zip php7.4-intl -y