Saturday 9 May 2020

INstall Lumen on Ubuntu local machine

https://auth0.com/blog/developing-restful-apis-with-lumen/

Start Lumen installation from above site. Lumen home page was hopeless.
Install composer correctly. TRy to read how to install.

When I just copied folder from my Mac into Ubuntu and run local:8000 it showed below error.

Below was unnecessary?
I found that it was not actually MySQL user issue. But wrong id/password in the .env file. I must have set it at some point. Change it with correct user detail, and voila!


Next day, I had this error.



FRom google, I found the issue is symfony version, and I updated following.
https://stackoverflow.com/questions/58975559/symfony-component-debug-exception-fatalerrorexception-laravel-error

But I still had error below.

matthew@SYDNEY-D-003:~/work2/scr-webservice$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - This package requires php ^7.2 but your PHP version (7.1.33) does not satisfy that requirement.
  Problem 2
    - laravel/lumen-framework v6.3.5 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
    - laravel/lumen-framework v6.3.4 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
    - laravel/lumen-framework v6.3.3 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
    - laravel/lumen-framework v6.3.2 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.


I found that LUmen requires Php7.2 and I have 7.1 in my ubuntu. I decided to update my php following below url.

https://www.liquidweb.com/kb/install-php-7-2-ubuntu-16-04/


But even after installing 7.2, it showed current version as 7.1. I don't know why. Because I followed above URL, my current apache is using Php7.2





Actually my issue was I was looking at /api/authors not /api/workorders. I don't know what to do now .asl;djf;sjadflks;jadlfj


No comments:

Post a Comment