Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fresh L11 is missing package when installing api #535

Closed
khalyomede opened this issue Sep 15, 2024 · 2 comments
Closed

Fresh L11 is missing package when installing api #535

khalyomede opened this issue Sep 15, 2024 · 2 comments

Comments

@khalyomede
Copy link

khalyomede commented Sep 15, 2024

Sanctum Version

4.0.2

Laravel Version

11.23.5

PHP Version

8.3.10

Database Driver & Version

No response

Description

An error occured on fresh install:

anwar@ubuntu:~/programming/project$ php artisan install:api

  Symfony\Component\Process\Exception\ProcessStartFailedException 

 The command "'composer' 'require' 'laravel/sanctum:^4.0'" failed.

Working directory: /home/alpine/app

Error: proc_open(): posix_spawn() failed: No such file or directory

 at vendor/symfony/process/Process.php:371
   367▕             restore_error_handler();
   368▕         }
   369▕ 
   370▕         if (!\is_resource($process)) {
 ➜ 371▕             throw new ProcessStartFailedException($this, $lastError);
   372▕         }
   373▕         $this->process = $process;
   374▕         $this->status = self::STATUS_STARTED;
   375▕ 

     +17 vendor frames 

 18  artisan:13
     Illuminate\Foundation\Application::handleCommand(Object(Symfony\Component\Console\Input\ArgvInput))

There seems to be some well known solution in the community, but I wonder if the suggested solution should be used or if there is a missing dependency on Sanctum side. Edit: The dependency is already included and this does not fix my issue.

laravel/framework#51820 (comment)

Steps To Reproduce

With these executables (all runing inside Alpine Linux v3):

anwar@ubuntu:~/programming/project$ composer --version
Creating code-social-network_composer_run ... done
Composer version 2.7.9 2024-09-04 14:43:28
PHP version 8.3.10 (/usr/local/bin/php)
Run the "diagnose" command to get more detailed diagnostics output.

anwar@ubuntu:~/programming/project$ php --version
Creating code-social-network_php_run ... done
PHP 8.3.10 (cli) (built: Aug  1 2024 19:53:18) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.10, Copyright (c) Zend Technologies

Create laravel project:

anwar@ubuntu:~/programming/project$ composer create-project laravel/laravel:11.* .

Install Sanctum:

anwar@ubuntu:~/programming/project$ php artisan install:api
Creating code-social-network_php_run ... done

   Symfony\Component\Process\Exception\ProcessStartFailedException 

  The command "'composer' 'require' 'laravel/sanctum:^4.0'" failed.

Working directory: /home/alpine/app

Error: proc_open(): posix_spawn() failed: No such file or directory

  at vendor/symfony/process/Process.php:371
    367▕             restore_error_handler();
    368▕         }
    369▕ 
    370▕         if (!\is_resource($process)) {
  ➜ 371▕             throw new ProcessStartFailedException($this, $lastError);
    372▕         }
    373▕         $this->process = $process;
    374▕         $this->status = self::STATUS_STARTED;
    375▕ 

      +17 vendor frames 

  18  artisan:13
      Illuminate\Foundation\Application::handleCommand(Object(Symfony\Component\Console\Input\ArgvInput))
@crynobone
Copy link
Member

Hi there,

Can you test this again with Laravel Framework 11.24.0?

@crynobone
Copy link
Member

Hey there,

We're closing this issue because it's inactive, already solved, old, or not relevant anymore. Feel free to open up a new issue if you're still experiencing this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants