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

Installer / Git Clone not working due to PHP incompatibilities #14676

Open
2 tasks done
SilentGoldfish opened this issue May 3, 2024 · 8 comments
Open
2 tasks done

Installer / Git Clone not working due to PHP incompatibilities #14676

SilentGoldfish opened this issue May 3, 2024 · 8 comments
Assignees

Comments

@SilentGoldfish
Copy link

Debug mode

Describe the bug

Issue with installing Snipe IT on a new ubuntu 24.04 server. This is a dedicated VM.
Downloading the Installer (or using the git clone) pull the latest version of PHP which is not compatible with SnipeIT.

Hence Vendor folder does not get created, PHP Artisan key:generate does not work

Install log:
snipeit-install.log

Reproduction steps

  1. wget https://raw.githubusercontent.com/snipe/snipe-it/master/install.sh
  2. chmod 744 install.sh
  3. ./install.sh

Expected behavior

Install to be successfull

Screenshots

No response

Snipe-IT Version

6.3.4

Operating System

Ubuntu

Web Server

Apache

PHP Version

8.3.6

Operating System

Ubuntu 24.04 Server

Browser

Google Chrome

Version

Version 124.0.6367.119 (Official Build) (64-bit)

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

Composer (version 2.7.4) successfully installed to: /home/snipeitapp/composer.phar
Use it: php composer.phar

* Setting permissions.
* Running composer.
* This can take 5 minutes or more. Tail /var/log/snipeit-install.log for more full command output.
 �-�\�|�/
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - Root composer.json requires php >=7.4.3 <8.2 but your php version (8.3.6) does not satisfy that requirement.
  Problem 2
    - nette/schema is locked to version v1.2.2 and an update of this package was not requested.
    - nette/schema v1.2.2 requires php >=7.1 <8.2 -> your php version (8.3.6) does not satisfy that requirement.
  Problem 3
    - nette/utils is locked to version v3.2.7 and an update of this package was not requested.
    - nette/utils v3.2.7 requires php >=7.2 <8.2 -> your php version (8.3.6) does not satisfy that requirement.
  Problem 4
    - phpspec/prophecy is locked to version v1.15.0 and an update of this package was not requested.
    - phpspec/prophecy v1.15.0 requires php ^7.2 || ~8.0, <8.2 -> your php version (8.3.6) does not satisfy that requirement.
  Problem 5
    - nette/schema v1.2.2 requires php >=7.1 <8.2 -> your php version (8.3.6) does not satisfy that requirement.
    - league/config v1.1.1 requires nette/schema ^1.2 -> satisfiable by nette/schema[v1.2.2].
    - league/config is locked to version v1.1.1 and an update of this package was not requested.

chgrp: cannot access '/var/www/html/snipeit/vendor': No such file or directory
* Generating the application key.
PHP Warning:  require(/var/www/html/snipeit/bootstrap/../vendor/autoload.php): Failed to open stream: No such file or directory in /var/www/html/snipeit/bootstrap/autoload.php on line 17
PHP Fatal error:  Uncaught Error: Failed opening required '/var/www/html/snipeit/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/html/snipeit/bootstrap/autoload.php:17
Stack trace:
#0 /var/www/html/snipeit/artisan(16): require()
#1 {main}
  thrown in /var/www/html/snipeit/bootstrap/autoload.php on line 17
* Artisan Migrate.
PHP Warning:  require(/var/www/html/snipeit/bootstrap/../vendor/autoload.php): Failed to open stream: No such file or directory in /var/www/html/snipeit/bootstrap/autoload.php on line 17
PHP Fatal error:  Uncaught Error: Failed opening required '/var/www/html/snipeit/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/html/snipeit/bootstrap/autoload.php:17
Stack trace:
#0 /var/www/html/snipeit/artisan(16): require()
#1 {main}
  thrown in /var/www/html/snipeit/bootstrap/autoload.php on line 17
* Creating scheduler cron.
* Restarting Apache httpd.
* Clearing cache and setting final permissions.
PHP Warning:  require(/var/www/html/snipeit/bootstrap/../vendor/autoload.php): Failed to open stream: No such file or directory in /var/www/html/snipeit/bootstrap/autoload.php on line 17
PHP Fatal error:  Uncaught Error: Failed opening required '/var/www/html/snipeit/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/html/snipeit/bootstrap/autoload.php:17
Stack trace:
#0 /var/www/html/snipeit/artisan(16): require()
#1 {main}
  thrown in /var/www/html/snipeit/bootstrap/autoload.php on line 17

---------------------------------------------------------------------------------

PHP Modules:
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
ldap
libxml
mbstring
mcrypt
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
random
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

Additional context

No response

Copy link

welcome bot commented May 3, 2024

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@snipe
Copy link
Owner

snipe commented May 3, 2024

Snipe-IT v6.x.x does not with with php 8.2 or higher, per the requirements docs. Upcoming v7 will.

@snipe snipe closed this as completed May 3, 2024
@SilentGoldfish
Copy link
Author

Hi Snipe,

Where I understand that, anyone who tries to build a new Snipe IT instance from the clone or installer between now and the release of V7 will not be able to.

Would it be worth putting a note that these will not work until V7 is released.

Also I assume it is still possible to spin up a new Snipe IT instance it just needs to be manually installed step by step?

@snipe
Copy link
Owner

snipe commented May 3, 2024

If I’m understanding the issue, it’s that the installer on master is currently trying to install the latest php? It should be locked to what currently works on that version. (Double checking that now tho.) The only real difference in requirements is that v6 doesn’t work on PHP8.2+, and Snipe-IT v7 won’t work with less than PHP8.1.

@snipe
Copy link
Owner

snipe commented May 3, 2024

Okay - in the sh script for Ubuntu it seems we’re just saying “install php”, which will give you latest. Re-opening this so we can see how to bridge that gap in the meantime. Snipe-IT v6.4.0 will be released next week, and v7 shortly after (assuming no surprises) but this is a fair issue. Thanks for raising it.

@snipe snipe reopened this May 3, 2024
@SilentGoldfish
Copy link
Author

Thank you, appreciate it

@Chaos-Consolidated
Copy link

I'm having the same issue. I believe the driving issue is Ubuntu, Debian, and most major linux distros have removed PHP8.1.* packages from their repositories. This makes installers rely on third party repositories which aren't suited for production.

@SilentGoldfish
Copy link
Author

Hi @snipe ,
Any further update on this?

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

No branches or pull requests

4 participants