IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Shell et commandes GNU Discussion :

Erreur d'exécution d'un fichier binaire elasticsearch


Sujet :

Shell et commandes GNU

  1. #1
    Candidat au Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Décembre 2015
    Messages
    7
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2015
    Messages : 7
    Points : 3
    Points
    3
    Par défaut Erreur d'exécution d'un fichier binaire elasticsearch
    Bonjour ,
    Ilya un moment que je fait face a ce type de problème.dès que je veux installer un logiciel (android par exemple, ou elastic search etc etc ) j'aurai une erreur liée a JAVA (si je me trompe pas , et je sais pas comment la réparer)

    je voulais installer elastiquesearch avec la commande mais j'ai ce message d'erreur
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
     ./elasticsearch-env: ligne 66: /usr/lib/java/jdk1.8.0_144/bin/java : impossible d’exécuter le fichier binaire : Erreur de format pour exec()
    j'ai executé la commande: ,j'ai eu ça :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    ./elasticsearch: Bourne-Again shell script, ASCII text executable
    si quelqu'un aura une solution me dis svp

  2. #2
    Expert confirmé
    Homme Profil pro
    Développeur informatique en retraite
    Inscrit en
    Avril 2008
    Messages
    2 101
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Côtes d'Armor (Bretagne)

    Informations professionnelles :
    Activité : Développeur informatique en retraite

    Informations forums :
    Inscription : Avril 2008
    Messages : 2 101
    Points : 5 849
    Points
    5 849
    Par défaut
    Bonjour.

    Sous quel linux es-tu?

    Faudrait te mettre d'accord, est-ce ./elastiquesearch ou ./elasticsearch?

    Apparemment, ./elastiquesearch est un script bash.

    Peux-tu nous en afficher le contenu (avec la commande cat ./elastiquesearch)?

    Après, il faudrait l'exécuter en mode debug, par exemple, avec /bin/bash -v -x ./elastiquesearch et voir le contenu des traces.

    PS: il y a pas mal de documents expliquant comment "installer elasticsearch"... et ça n'a pas l'air tout simple...

  3. #3
    Candidat au Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Décembre 2015
    Messages
    7
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2015
    Messages : 7
    Points : 3
    Points
    3
    Par défaut
    oui c'est ./elasticsearch je me suis trompée quand j ai écris sur le forum .
    voilà ce que m'affiche la commande cat ./elasticsearch
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    #!/bin/bash
     
    # CONTROLLING STARTUP:
    #
    # This script relies on a few environment variables to determine startup
    # behavior, those variables are:
    #
    #   ES_PATH_CONF -- Path to config directory
    #   ES_JAVA_OPTS -- External Java Opts on top of the defaults set
    #
    # Optionally, exact memory values can be set using the `ES_JAVA_OPTS`. Note that
    # the Xms and Xmx lines in the JVM options file must be commented out. Example
    # values are "512m", and "10g".
    #
    #   ES_JAVA_OPTS="-Xms8g -Xmx8g" ./bin/elasticsearch
     
    source "`dirname "$0"`"/elasticsearch-env
     
    ES_JVM_OPTIONS="$ES_PATH_CONF"/jvm.options
    JVM_OPTIONS=`"$JAVA" -cp "$ES_CLASSPATH" org.elasticsearch.tools.launchers.JvmOptionsParser "$ES_JVM_OPTIONS"`
    ES_JAVA_OPTS="${JVM_OPTIONS//\$\{ES_TMPDIR\}/$ES_TMPDIR} $ES_JAVA_OPTS"
     
    cd "$ES_HOME"
    # manual parsing to find out, if process should be detached
    if ! echo $* | grep -E '(^-d |-d$| -d |--daemonize$|--daemonize )' > /dev/null; then
      exec \
        "$JAVA" \
        $ES_JAVA_OPTS \
        -Des.path.home="$ES_HOME" \
        -Des.path.conf="$ES_PATH_CONF" \
        -cp "$ES_CLASSPATH" \
        org.elasticsearch.bootstrap.Elasticsearch \
        "$@"
    else
      exec \
        "$JAVA" \
        $ES_JAVA_OPTS \
        -Des.path.home="$ES_HOME" \
        -Des.path.conf="$ES_PATH_CONF" \
        -cp "$ES_CLASSPATH" \
        org.elasticsearch.bootstrap.Elasticsearch \
        "$@" \
        <&- &
      retval=$?
      pid=$!
      [ $retval -eq 0 ] || exit $retval
      if [ ! -z "$ES_STARTUP_SLEEP_TIME" ]; then
        sleep $ES_STARTUP_SLEEP_TIME
      fi
      if ! ps -p $pid > /dev/null ; then
        exit 1
      fi
      exit 0
    fi
     
    exit $?
    et voila le contenue de la trace :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    #!/bin/bash
     
    # CONTROLLING STARTUP:
    #
    # This script relies on a few environment variables to determine startup
    # behavior, those variables are:
    #
    #   ES_PATH_CONF -- Path to config directory
    #   ES_JAVA_OPTS -- External Java Opts on top of the defaults set
    #
    # Optionally, exact memory values can be set using the `ES_JAVA_OPTS`. Note that
    # the Xms and Xmx lines in the JVM options file must be commented out. Example
    # values are "512m", and "10g".
    #
    #   ES_JAVA_OPTS="-Xms8g -Xmx8g" ./bin/elasticsearch
     
    source "`dirname "$0"`"/elasticsearch-env
    dirname "$0"
    ++ dirname ./elasticsearch
    + source ./elasticsearch-env
    #!/bin/bash
     
    set -e -o pipefail
    ++ set -e -o pipefail
     
    CDPATH=""
    ++ CDPATH=
     
    SCRIPT="$0"
    ++ SCRIPT=./elasticsearch
     
    # SCRIPT might be an arbitrarily deep series of symbolic links; loop until we
    # have the concrete path
    while [ -h "$SCRIPT" ] ; do
      ls=`ls -ld "$SCRIPT"`
      # Drop everything prior to ->
      link=`expr "$ls" : '.*-> \(.*\)$'`
      if expr "$link" : '/.*' > /dev/null; then
        SCRIPT="$link"
      else
        SCRIPT=`dirname "$SCRIPT"`/"$link"
      fi
    done
    ++ '[' -h ./elasticsearch ']'
     
    # determine Elasticsearch home; to do this, we strip from the path until we find
    # bin, and then strip bin (there is an assumption here that there is no nested
    # directory under bin also named bin)
    ES_HOME=`dirname "$SCRIPT"`
    dirname "$SCRIPT"
    +++ dirname ./elasticsearch
    ++ ES_HOME=.
     
    # now make ES_HOME absolute
    ES_HOME=`cd "$ES_HOME"; pwd`
    cd "$ES_HOME"; pwd
    +++ cd .
    +++ pwd
    ++ ES_HOME=/usr/elasticsearch-6.2.1/bin
     
    while [ "`basename "$ES_HOME"`" != "bin" ]; do
      ES_HOME=`dirname "$ES_HOME"`
    done
    basename "$ES_HOME"
    +++ basename /usr/elasticsearch-6.2.1/bin
    ++ '[' bin '!=' bin ']'
    ES_HOME=`dirname "$ES_HOME"`
    dirname "$ES_HOME"
    +++ dirname /usr/elasticsearch-6.2.1/bin
    ++ ES_HOME=/usr/elasticsearch-6.2.1
     
    # now set the classpath
    ES_CLASSPATH="$ES_HOME/lib/*"
    ++ ES_CLASSPATH='/usr/elasticsearch-6.2.1/lib/*'
     
    # now set the path to java
    if [ -x "$JAVA_HOME/bin/java" ]; then
      JAVA="$JAVA_HOME/bin/java"
    else
      set +e
      JAVA=`which java`
      set -e
    fi
    ++ '[' -x /usr/lib/java/jdk1.8.0_144/bin/java ']'
    ++ JAVA=/usr/lib/java/jdk1.8.0_144/bin/java
     
    if [ ! -x "$JAVA" ]; then
      echo "could not find java; set JAVA_HOME or ensure java is in PATH"
      exit 1
    fi
    ++ '[' '!' -x /usr/lib/java/jdk1.8.0_144/bin/java ']'
     
    # do not let JAVA_TOOL_OPTIONS slip in (as the JVM does by default)
    if [ ! -z "$JAVA_TOOL_OPTIONS" ]; then
      echo "warning: ignoring JAVA_TOOL_OPTIONS=$JAVA_TOOL_OPTIONS"
      unset JAVA_TOOL_OPTIONS
    fi
    ++ '[' '!' -z '' ']'
     
    # JAVA_OPTS is not a built-in JVM mechanism but some people think it is so we
    # warn them that we are not observing the value of $JAVA_OPTS
    if [ ! -z "$JAVA_OPTS" ]; then
      echo -n "warning: ignoring JAVA_OPTS=$JAVA_OPTS; "
      echo "pass JVM parameters via ES_JAVA_OPTS"
    fi
    ++ '[' '!' -z '' ']'
     
    # check the Java version
    "$JAVA" -cp "$ES_CLASSPATH" org.elasticsearch.tools.launchers.JavaVersionChecker
    ++ /usr/lib/java/jdk1.8.0_144/bin/java -cp '/usr/elasticsearch-6.2.1/lib/*' org.elasticsearch.tools.launchers.JavaVersionChecker
    ./elasticsearch-env: ligne 66: /usr/lib/java/jdk1.8.0_144/bin/java*: impossible d’exécuter le fichier binaire*: Erreur de format pour exec()

  4. #4
    Candidat au Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Décembre 2015
    Messages
    7
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2015
    Messages : 7
    Points : 3
    Points
    3
    Par défaut
    je suis sur ubuntu 16.04

  5. #5
    Membre éprouvé
    Homme Profil pro
    Technicien maintenance
    Inscrit en
    Novembre 2012
    Messages
    375
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Vienne (Poitou Charente)

    Informations professionnelles :
    Activité : Technicien maintenance
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Novembre 2012
    Messages : 375
    Points : 1 030
    Points
    1 030
    Par défaut
    Et si tu tapes /usr/lib/java/jdk1.8.0_144/bin/java dans un terminal, est-ce-que java s'exécute ?

    Il s'agit peut-être d'un problème de version de Java ?

    D'après la doc, il faut la version d'Oracle ou OpenJDK.

  6. #6
    Candidat au Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Décembre 2015
    Messages
    7
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2015
    Messages : 7
    Points : 3
    Points
    3
    Par défaut
    j'ai tapé ce que tu m'a dis sur terminal , j'ai eu ceci
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    bash: /usr/lib/java/jdk1.8.0_144/bin/java: impossible d’exécuter le fichier binaire: Erreur de format pour exec()

  7. #7
    Expert éminent sénior Avatar de Flodelarab
    Homme Profil pro
    Inscrit en
    Septembre 2005
    Messages
    5 243
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Charente (Poitou Charente)

    Informations forums :
    Inscription : Septembre 2005
    Messages : 5 243
    Points : 13 458
    Points
    13 458
    Par défaut
    Bonjour

    N'aurais-tu pas fait une confusion et un mélange incompatible entre 32 bits et 64 bits par hasard ?
    Cette réponse vous apporte quelque chose ? Cliquez sur en bas à droite du message.

Discussions similaires

  1. Erreur à l'exécution d'un fichier .js
    Par Yasiño dans le forum NodeJS
    Réponses: 1
    Dernier message: 17/04/2013, 17h27
  2. Erreur d'exécution '75' - Erreur d'accès Chemin/Fichier
    Par Ptikir dans le forum Macros et VBA Excel
    Réponses: 5
    Dernier message: 08/04/2009, 10h35
  3. Intégrer un fichier binaire à l'exécutable
    Par Nicolas V. dans le forum C
    Réponses: 5
    Dernier message: 04/07/2008, 16h40
  4. Réponses: 15
    Dernier message: 31/03/2007, 16h32
  5. Réponses: 7
    Dernier message: 12/08/2005, 09h47

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo