DEV Community

Shaikh Al Amin
Shaikh Al Amin

Posted on • Edited on

1

How to install PHP 8.2 and Laravel version 10 in Ubuntu

Install Ubuntu basic dependency:

sudo apt install curl software-properties-common ca-certificates lsb-release apt-transport-https
Enter fullscreen mode Exit fullscreen mode

Add all PHP repositories:

LC_ALL=C.UTF-8 sudo add-apt-repository ppa:ondrej/php
Enter fullscreen mode Exit fullscreen mode

Update the system:

sudo apt update
Enter fullscreen mode Exit fullscreen mode

Install PHP 8.2

sudo apt install php8.2
Enter fullscreen mode Exit fullscreen mode

Now install all PHP dependencies for Laravel version 10:

sudo apt install php8.2-curl openssl php8.2-bcmath php8.2-curl php8.2-mbstring php8.2-mysql php8.2-tokenizer php8.2-xml php8.2-zip php8.2-gd
Enter fullscreen mode Exit fullscreen mode

Now install composer:

curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
sudo chmod +x /usr/local/bin/composer
Enter fullscreen mode Exit fullscreen mode

Now create laravel project using composer:

composer create-project laravel/laravel test_laravel
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay