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)

Image of AssemblyAI

Automatic Speech Recognition with AssemblyAI

Experience near-human accuracy, low-latency performance, and advanced Speech AI capabilities with AssemblyAI's Speech-to-Text API. Sign up today and get $50 in API credit. No credit card required.

Try the API

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay