Error installing JWT/Laravel

Asked

Viewed 343 times

2

I’m trying to install the JWTAuth in my project. I updated my composer.json as documented:

Composer.json:

"require": {
"tymon/jwt-auth": "0.5.*"
}

I ran the Composer update command and presented the following error:

Problem 1
    - tymon/jwt-auth 0.5.4 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.0, 5.0.1, 5.0.2].
    - tymon/jwt-auth 0.5.5 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.0, 5.0.1, 5.0.2].
    - tymon/jwt-auth 0.5.6 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.0, 5.0.1, 5.0.2].
    - tymon/jwt-auth 0.5.7 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.0, 5.0.1, 5.0.2].
    - tymon/jwt-auth 0.5.8 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.0, 5.0.1, 5.0.2].
    - tymon/jwt-auth 0.5.9 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.0, 5.0.1, 5.0.2].
    - tymon/jwt-auth 0.5.1 requires namshi/jose 2.2.* -> satisfiable by namshi/jose[2.2.0, 2.2.1, 2.2.2].
    - tymon/jwt-auth 0.5.2 requires namshi/jose 2.2.* -> satisfiable by namshi/jose[2.2.0, 2.2.1, 2.2.2].
    - tymon/jwt-auth 0.5.3 requires namshi/jose 2.2.* -> satisfiable by namshi/jose[2.2.0, 2.2.1, 2.2.2].
    - tymon/jwt-auth 0.5.0 requires namshi/jose 2.0.* -> satisfiable by namshi/jose[2.0.0, 2.0.1, 2.0.2, 2.0.3].
    - namshi/jose 5.0.2 requires phpseclib/phpseclib ~0.3 -> satisfiable by phpseclib/phpseclib[0.3.0, 0.3.1, 0.3.10, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9] but these conflict with your requirements or minimum-stability.
    - namshi/jose 5.0.1 requires phpseclib/phpseclib ~0.3 -> satisfiable by phpseclib/phpseclib[0.3.0, 0.3.1, 0.3.10, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9] but these conflict with your requirements or minimum-stability.
    - namshi/jose 5.0.0 requires phpseclib/phpseclib ~0.3 -> satisfiable by phpseclib/phpseclib[0.3.0, 0.3.1, 0.3.10, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9] but these conflict with your requirements or minimum-stability.
    - namshi/jose 2.2.2 requires phpseclib/phpseclib ~0.3 -> satisfiable by phpseclib/phpseclib[0.3.0, 0.3.1, 0.3.10, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9] but these conflict with your requirements or minimum-stability.
    - namshi/jose 2.2.1 requires phpseclib/phpseclib ~0.3 -> satisfiable by phpseclib/phpseclib[0.3.0, 0.3.1, 0.3.10, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9] but these conflict with your requirements or minimum-stability.
    - namshi/jose 2.2.0 requires phpseclib/phpseclib ~0.3 -> satisfiable by phpseclib/phpseclib[0.3.0, 0.3.1, 0.3.10, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9] but these conflict with your requirements or minimum-stability.
    - namshi/jose 2.0.3 requires phpseclib/phpseclib ~0.3 -> satisfiable by phpseclib/phpseclib[0.3.0, 0.3.1, 0.3.10, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9] but these conflict with your requirements or minimum-stability.
    - namshi/jose 2.0.2 requires phpseclib/phpseclib ~0.3 -> satisfiable by phpseclib/phpseclib[0.3.0, 0.3.1, 0.3.10, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9] but these conflict with your requirements or minimum-stability.
    - namshi/jose 2.0.1 requires phpseclib/phpseclib ~0.3 -> satisfiable by phpseclib/phpseclib[0.3.0, 0.3.1, 0.3.10, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9] but these conflict with your requirements or minimum-stability.
    - namshi/jose 2.0.0 requires phpseclib/phpseclib ~0.3 -> satisfiable by phpseclib/phpseclib[0.3.0, 0.3.1, 0.3.10, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9] but these conflict with your requirements or minimum-stability.
    - Installation request for tymon/jwt-auth 0.5.* -> satisfiable by tymon/jwt-auth[0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5.6, 0.5.7, 0.5.8, 0.5.9].

I’ve been searching the internet and discovered that it might be something related to macosx. My version of Openssl php -i | grep OpenSSL:

SSL Version => OpenSSL/1.0.2g
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.0.2h  3 May 2016
OpenSSL Header Version => OpenSSL 1.0.2h  3 May 2016
Native OpenSSL support => enabled

Version of PHP (php -v):

PHP 7.0.8-2+deb.sury.org~xenial+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.8-2+deb.sury.org~xenial+1, Copyright (c) 1999-2016, by Zend Technologies
    with blackfire v1.10.6, https://blackfire.io, by Blackfireio Inc.

Xcode:

Xcode Version 8.1

2 answers

3


This error refers to dependencies on this library that you don’t have, try editing it composer.json as follows:

"require": {
    "phpseclib/phpseclib": "*",
    "namshi/jose": "*",
    "tymon/jwt-auth": "0.5.*"
}
  • Just before you answer I managed to solve the problem. I appreciate the attention.

  • 1

    No problem, arrange! ;)

2

I managed to solve the problem using composer require tymon/jwt-auth:1.0.0-alpha.3

Browser other questions tagged

You are not signed in. Login or sign up in order to post.