pierobot / mangapie

This is a self-hosted server for archived manga.
BSD 3-Clause "New" or "Revised" License
64 stars 9 forks source link

Issue with composer install #125

Closed ghost closed 5 years ago

ghost commented 5 years ago

I followed the instructions in the wiki to install mangapie on my Debian server earlier today and ran into the following error message after running the command composer install --no-dev in mangapie's root directory.

putty_2019-02-21_18-16-41

Any idea what could be causing this issue?

pierobot commented 5 years ago

Hello, sorry for the late reply.

A quick google search seems to indicate that either the packages or PHP need to be updated. What version of PHP are you running?

I just reinstalled Debian so I'll see if I run into the same problem.

ghost commented 5 years ago

@pierobot I installed PHP and the packages straight from the PHP repository so it can't be that. I'm using PHP 7.3

pierobot commented 5 years ago

I meant with the composer packages. I'm getting a different error. Hold on while I sort them out. Something must have changed in one of the packages.

pierobot commented 5 years ago

I pushed a commit that fixed issues on my end. I did not run into your exact problem but did it, by any chance, fix it for you?

ghost commented 5 years ago

@pierobot I'm still getting the same error, unfortunately.

putty_2019-02-25_12-44-18

pierobot commented 5 years ago

Can you paste the output of git log | grep commit | head -1 and git status inside mangapie dir.

ghost commented 5 years ago

@pierobot Here's the output of those two commands:

putty_2019-02-25_20-00-39

pierobot commented 5 years ago

What version of PHP are you using? Any other information you think might be worth mentioning?

ghost commented 5 years ago

@pierobot I'm using this version of PHP:

putty_2019-02-25_20-46-34

Not sure what else I can do at this point. Do you have Skype or maybe Discord? I'd like to walk you through how I set up my Debian virtual machine so we can see where the error is occurring.

pierobot commented 5 years ago

I'd prefer to keep this over github so people that run into the same problem can have something to reference. If this project ever gets big enough I'll consider creating a discord server for it. I know it's tedious to keep going back and forth but bear with me.

What version of composer are you using?

ghost commented 5 years ago

@pierobot I'm using this version of composer:

putty_2019-02-25_21-09-01

Edit: I installed the version above from the official Debian repositories. Just now I installed the latest version from the PHP repositories. See screenshot below.

putty_2019-02-25_21-12-31

ghost commented 5 years ago

@pierobot It seems like the very old version of composer in the Debian repositories was the cause of the initial issue. Basically, if you're on Debian, you have to install composer with curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer && chmod +x /usr/local/bin/composer instead of with apt install composer.

Running composer install --no-dev inside the mangapie directory with the latest version of composer seemed to work at first but produced an error message at the end as well. See screenshots below.

putty_2019-02-25_21-18-09

putty_2019-02-25_21-18-14

pierobot commented 5 years ago

Awesome, glad you figured it out. I will add it to the wiki.

As to the new issue you're having you can install redis-server and edit CACHE_DRIVER in your .env file to redis. I'm updating the wiki since it seems some stuff is out order.

ghost commented 5 years ago

@pierobot I installed redis-server and made the change in the .env file but I'm still getting the same error message when I run "composer install --no-dev" inside the mangapie root directory.

pierobot commented 5 years ago

You're making the change to .env not .env.example, correct? Might be worth trying php artisan config:cache?

ghost commented 5 years ago

@pierobot Correct. I get the following error when I run that command in the mangapie folder:

root@debian:~/mangapie# php artisan config:cache
PHP Warning:  require(/root/mangapie/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /root/mangapie/bootstrap/autoload.php on line 17
PHP Fatal error:  require(): Failed opening required '/root/mangapie/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/php') in /root/mangapie/bootstrap/autoload.php on line 17
pierobot commented 5 years ago

Sorry for the late reply, I was in another city on important matters.

From the looks of it, your vendor folder is missing files. Does vendor/autoload.php exist? I would try deleting the entire vendor folder and run the composer install command again.

ghost commented 5 years ago

@pierobot Same result, I'm afraid. I think I'll just wait for you to update the Docker container and use that.