directory "/home/mamunsson/projekt" is not empty
you cant install a new project into an existing project
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
I installed PHP 8, phpMyAdmin, apache2, Composer and Laravel on my Linux laptop. When I type: "php artisan serve" in VS Code, I get: "Could not open input file: artisan".
I copied the Laravel project I was working on from my Linux desktop to my Linux laptop via a USB drive. The Laravel project folder is inside the Linux Home folder.
This is from the Linux terminal:
mamunsson@mamunsson-Lenovo-ideapad-100-15IBY:~> sudo zypper install php php-mysql php-mbstring php-json php-xm
l
[sudo] password for root:
Loading repository data...
Reading installed packages...
'php-mysql' not found in package names. Trying capabilities.
'php8-mysql' providing 'php-mysql' is already installed.
'php' not found in package names. Trying capabilities.
'php8' providing 'php' is already installed.
'php-mbstring' not found in package names. Trying capabilities.
'php8-mbstring' providing 'php-mbstring' is already installed.
'php-json' not found in package names. Trying capabilities.
'php8' providing 'php-json' is already installed.
'php-xml' not found in package names. Trying capabilities.
'php8' providing 'php-xml' is already installed.
Resolving package dependencies...
Nothing to do.
mamunsson@mamunsson-Lenovo-ideapad-100-15IBY:~> sudo zypper install composer
Loading repository data...
Reading installed packages...
'composer' not found in package names. Trying capabilities.
Resolving package dependencies...
The following 3 NEW packages are going to be installed:
php8-phar php8-zlib php-composer2
3 new packages to install.
Overall download size: 724.3 KiB. Already cached: 0 B. After the operation, additional 2.6 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): y
Retrieving: php8-zlib-8.0.30-150400.4.37.1.x86_64 (Update repository with updates from SUSE Linux Enterprise
15)
(1/3), 76.3 KiB
Retrieving: php8-zlib-8.0.30-150400.4.37.1.x86_64.rpm ....................................[done (246.1 KiB/s)]
Retrieving: php8-phar-8.0.30-150400.4.37.1.x86_64 (Update repository with updates from SUSE Linux Enterprise
15)
(2/3), 178.4 KiB
Retrieving: php8-phar-8.0.30-150400.4.37.1.x86_64.rpm .....................................[done (86.7 KiB/s)]
Retrieving: php-composer2-2.2.3-150400.3.9.1.noarch (Update repository with updates from SUSE Linux Enterprise
15)
(3/3), 469.6 KiB
Retrieving: php-composer2-2.2.3-150400.3.9.1.noarch.rpm ....................................[done (1.9 MiB/s)]
Checking for file conflicts: ...........................................................................[done]
(1/3) Installing: php8-zlib-8.0.30-150400.4.37.1.x86_64 ................................................[done]
(2/3) Installing: php8-phar-8.0.30-150400.4.37.1.x86_64 ................................................[done]
update-alternatives: using /usr/bin/composer2 to provide /usr/bin/composer (composer) in auto mode
(3/3) Installing: php-composer2-2.2.3-150400.3.9.1.noarch ..............................................[done]
mamunsson@mamunsson-Lenovo-ideapad-100-15IBY:~> composer create-project --prefer-dist laravel/laravel projekt
Creating a "laravel/laravel" project at "./projekt"
Installing laravel/laravel (v9.5.2)
- Downloading laravel/laravel (v9.5.2)
- Installing laravel/laravel (v9.5.2): Extracting archive
Created project in /home/mamunsson/projekt
> @php -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework[v9.36.4, ..., v9.52.16] require league/flysystem ^3.8.0 -> satisfiable by league/flysy
stem[3.8.0, ..., 3.26.0].
- laravel/framework[v9.19.0, ..., v9.36.3] require league/flysystem ^3.0.16 -> satisfiable by league/flysy
stem[3.0.16, ..., 3.26.0].
- league/flysystem[3.0.10, ..., 3.14.0] require league/mime-type-detection ^1.0.0 -> satisfiable by league
/mime-type-detection[1.0.0, ..., 1.15.0].
- league/flysystem[3.15.0, ..., 3.26.0] require league/flysystem-local ^3.0.0 -> satisfiable by league/fly
system-local[3.15.0, ..., 3.25.1].
- league/mime-type-detection[1.0.0, ..., 1.3.0] require php ^7.2 -> your php version (8.0.30) does not sat
isfy that requirement.
- league/mime-type-detection[1.4.0, ..., 1.15.0] require ext-fileinfo * -> it is missing from your system.
Install or enable PHP's fileinfo extension.
- league/flysystem-local[3.15.0, ..., 3.25.1] require ext-fileinfo * -> it is missing from your system. In
stall or enable PHP's fileinfo extension.
- Root composer.json requires laravel/framework ^9.19 -> satisfiable by laravel/framework[v9.19.0, ..., v9
.52.16].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php8/cli/php.ini
- /etc/php8/conf.d/20-mysqlnd.ini
- /etc/php8/conf.d/bz2.ini
- /etc/php8/conf.d/ctype.ini
- /etc/php8/conf.d/curl.ini
- /etc/php8/conf.d/dom.ini
- /etc/php8/conf.d/gd.ini
- /etc/php8/conf.d/gettext.ini
- /etc/php8/conf.d/iconv.ini
- /etc/php8/conf.d/mbstring.ini
- /etc/php8/conf.d/mysqli.ini
- /etc/php8/conf.d/openssl.ini
- /etc/php8/conf.d/pdo.ini
- /etc/php8/conf.d/pdo_mysql.ini
- /etc/php8/conf.d/pdo_sqlite.ini
- /etc/php8/conf.d/phar.ini
- /etc/php8/conf.d/sqlite3.ini
- /etc/php8/conf.d/tokenizer.ini
- /etc/php8/conf.d/xmlreader.ini
- /etc/php8/conf.d/xmlwriter.ini
- /etc/php8/conf.d/zip.ini
- /etc/php8/conf.d/zlib.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-fileinfo` to temporarily ignore these requ
ired extensions.
mamunsson@mamunsson-Lenovo-ideapad-100-15IBY:~> sudo zypper install php8-fileinfo
[sudo] password for root:
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following NEW package is going to be installed:
php8-fileinfo
1 new package to install.
Overall download size: 339.4 KiB. Already cached: 0 B. After the operation, additional 6.5 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): y
Retrieving: php8-fileinfo-8.0.30-150400.4.37.1.x86_64 (Update repository with updates from SUSE Linux
Enterprise 15)
(1/1), 339.4 KiB
Retrieving: php8-fileinfo-8.0.30-150400.4.37.1.x86_64.rpm ................................[done (354.9 KiB/s)]
Checking for file conflicts: ...........................................................................[done]
(1/1) Installing: php8-fileinfo-8.0.30-150400.4.37.1.x86_64 ............................................[done]
mamunsson@mamunsson-Lenovo-ideapad-100-15IBY:~> composer create-project --prefer-dist --ignore-platform-reqs l
aravel/laravel projekt
Creating a "laravel/laravel" project at "./projekt"
[InvalidArgumentException]
Project directory "/home/mamunsson/projekt" is not empty.
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL]
[--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom
-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--i
gnore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [<package>] [<directory>] [<vers
ion>]
mamunsson@mamunsson-Lenovo-ideapad-100-15IBY:~> composer create-project --prefer-dist laravel/laravel projekt
Creating a "laravel/laravel" project at "./projekt"
[InvalidArgumentException]
Project directory "/home/mamunsson/projekt" is not empty.
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL]
[--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom
-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--i
gnore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [<package>] [<directory>] [<vers
ion>]
Grateful for your support.
If you want to work on the same project on two computers you should create a git repository on for example github or gitlab. Push your current project to that repository on the computer where you first created the project. Then on your laptop clone the project from that git repository.
After cloning the project run composer install + npm install and also configure the ENV file.
When you now make changes to the project on one of the two computers you can push those changes to the git repository and pull them on the other computer. By doing this your project will be up to date and equal on both computers instead of having to move all the updated file manually.
Please or to participate in this conversation.