problème d'installation sur linux

Je n’arrive pas à installer DIaCAMMA V2 sur mon pc sous linux debian
vous trouverez ci après les messages d’erreur…

Debian + HandyLinux-2 - prenez le contrôle de votre système

$ PACKAGES=“diacamma-asso diacamma-syndic lucterios-standard”

$ APP_NAME=“Diacamma”

$ function usage

{
echo “${0##/}: installation for Lucterios"
echo "${0##
/} -h”
echo “${0##*/} [-p ] [-n <application_name>]”
echo “option:”
echo " -h: show this help"
echo " -p: define the packages list to install (default: ‘$PACKAGES’)"
echo " -n: define the application name for shortcut (default: ‘$APP_NAME’)"
exit 0
}while getopts “i:p:n:h” opt ; do
-bash: erreur de syntaxe près du symbole inattendu « do »

$ case $opt in

p) PACKAGES="$OPTARG"
   ;;
n) APP_NAME="$OPTARG"
   ;;
h) usage $0
   exit 0
   ;;

?) echo “Unrecognized parameter -$OPTARG” >&2
exit 1
;;
:slight_smile: echo “Option -$OPTARG requires an argument.” >&2
exit 1
;;esac

$ done
-bash: erreur de syntaxe près du symbole inattendu « done »

$ PIP_OPTION=“”

$ if [ ! -z “$http_proxy” ]

then
PIP_OPTION=“$PIP_OPTION --proxy=$http_proxy”
fi

$ echo “====== install lucterios #16041410 ======”
====== install lucterios #16041410 ======

$ echo “install: packages=$PACKAGES application_name=$APP_NAME”
install: packages=diacamma-asso diacamma-syndic lucterios-standard application_name=Diacamma

$ echo “------ check perquisite -------”
------ check perquisite -------

$ echoif [ ! -z “$(which apt-get 2>/dev/null)” ]; then # DEB linux like
-bash: erreur de syntaxe près du symbole inattendu « then »

$ apt-get install -y libxml2-dev libxslt-dev libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev
E: Impossible d’ouvrir le fichier verrou /var/lib/dpkg/lock - open (13: Permission non accordée)
E: Impossible de verrouiller le répertoire d’administration (/var/lib/dpkg/). Avez-vous les privilèges du superutilisateur ?

$ apt-get install -y python-pip python-dev
E: Impossible d’ouvrir le fichier verrou /var/lib/dpkg/lock - open (13: Permission non accordée)
E: Impossible de verrouiller le répertoire d’administration (/var/lib/dpkg/). Avez-vous les privilèges du superutilisateur ?

$ apt-get install -y python3-pip python3-dev
E: Impossible d’ouvrir le fichier verrou /var/lib/dpkg/lock - open (13: Permission non accordée)
E: Impossible de verrouiller le répertoire d’administration (/var/lib/dpkg/). Avez-vous les privilèges du superutilisateur ?

$ apt-get install -y python-tk python-imaging
E: Impossible d’ouvrir le fichier verrou /var/lib/dpkg/lock - open (13: Permission non accordée)
E: Impossible de verrouiller le répertoire d’administration (/var/lib/dpkg/). Avez-vous les privilèges du superutilisateur ?

$ apt-get install -y python3-tk ‘python3-imaging|python3-pil’
E: Impossible d’ouvrir le fichier verrou /var/lib/dpkg/lock - open (13: Permission non accordée)
E: Impossible de verrouiller le répertoire d’administration (/var/lib/dpkg/). Avez-vous les privilèges du superutilisateur ?

$ else if [ ! -z “$(which dnf 2>/dev/null)” ]; then # RPM unix/linux like
-bash: erreur de syntaxe près du symbole inattendu « else »

$ dnf install -y libxml2-devel libxslt-devel libjpeg-devel gcc
No command ‘dnf’ found, did you mean:
Command ‘df’ from package ‘coreutils’ (main)
Command ‘fnf’ from package ‘confluence’ (main)
Command ‘dff’ from package ‘dff’ (main)
dnf: command not found

$ dnf install -y libfreetype6 libfreetype6-devel
No command ‘dnf’ found, did you mean:
Command ‘df’ from package ‘coreutils’ (main)
Command ‘fnf’ from package ‘confluence’ (main)
Command ‘dff’ from package ‘dff’ (main)
dnf: command not found

$ dnf install -y python-devel python-imaging tkinter
No command ‘dnf’ found, did you mean:
Command ‘df’ from package ‘coreutils’ (main)
Command ‘fnf’ from package ‘confluence’ (main)
Command ‘dff’ from package ‘dff’ (main)
dnf: command not found

$ dnf install -y python3-devel python3-imaging python3-tkinter
No command ‘dnf’ found, did you mean:
Command ‘df’ from package ‘coreutils’ (main)
Command ‘fnf’ from package ‘confluence’ (main)
Command ‘dff’ from package ‘dff’ (main)
dnf: command not found

$ else if [ ! -z “$(which yum 2>/dev/null)” ]; then # RPM unix/linux like
-bash: erreur de syntaxe près du symbole inattendu « else »

$ yum install -y libxml2-devel libxslt-devel libjpeg-devel gcc
The program ‘yum’ is currently not installed. To run ‘yum’ please ask your administrator to install the package ‘yum’
yum: command not found

$ yum install -y libfreetype6 libfreetype6-devel
The program ‘yum’ is currently not installed. To run ‘yum’ please ask your administrator to install the package ‘yum’
yum: command not found

$ yum install -y python-devel python-imaging tkinter
The program ‘yum’ is currently not installed. To run ‘yum’ please ask your administrator to install the package ‘yum’
yum: command not found

$ yum install -y python3-devel python3-imaging python3-tkinter
The program ‘yum’ is currently not installed. To run ‘yum’ please ask your administrator to install the package ‘yum’
yum: command not found

$ easy_install pip
error: can’t create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

[Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/test-easy-install-5050.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

/usr/local/lib/python2.7/dist-packages/

Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or “root” account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

https://pythonhosted.org/setuptools/easy_install.html

Please make the appropriate changes for your system and try again.

$ else
-bash: erreur de syntaxe près du symbole inattendu « else »

$ echo "++++++ Unix/Linux distribution not available for this script! +++++++"fi; fi; fiecho
-bash: erreur de syntaxe près du symbole inattendu « fi »

$ echo “------ configure virtual environment ------”
------ configure virtual environment ------

$ echoLUCTERIOS_PATH=“/var/lucterios2”

$ PIP_CMD=

$ PYTHON_CMD=

$ for pip_iter in 3 2do

if [ -z “$PIP_CMD” -a ! -z “$(which “pip$pip_iter”)” ]
-bash: erreur de syntaxe près du symbole inattendu « if »

$ then
-bash: erreur de syntaxe près du symbole inattendu « then »

$ PIP_CMD=“pip$pip_iter”

$ PYTHON_CMD=“python$pip_iter”

$ fi
-bash: erreur de syntaxe près du symbole inattendu « fi »

$ done
-bash: erreur de syntaxe près du symbole inattendu « done »

$ [ -z “$PIP_CMD” ] && echo “No pip found!” && exit 1set -eecho “$PYTHON_CMD $(which $PIP_CMD) install $PIP_OPTION virtualenv -U”

$ $PYTHON_CMD $(which $PIP_CMD) install -U $PIP_OPTION pip virtualenv
Downloading/unpacking pip from https://pypi.python.org/packages/3f/ef/935d9296acc4f48d1791ee56a73781271dce9712b059b475d3f5fa78487b/pip-9.0.0-py2.py3-none-any.whl#md5=55f554c8be55cba2a766e40fdb1bb25d
Downloading pip-9.0.0-py2.py3-none-any.whl (1.3MB): 1.3MB downloaded
Downloading/unpacking virtualenv
Downloading virtualenv-15.0.3-py2.py3-none-any.whl (3.5MB): 3.5MB downloaded
Installing collected packages: pip, virtualenv
Found existing installation: pip 1.5.6
Not uninstalling pip at /usr/lib/python2.7/dist-packages, owned by OS
Compiling /tmp/pip-build-3628mC/pip/pip/_vendor/html5lib/treewalkers/etree.py …
File “/tmp/pip-build-3628mC/pip/pip/_vendor/html5lib/treewalkers/etree.py”, line 13
from pip._vendor. import string_types
^
SyntaxError: invalid syntax

Can’t roll back pip; was not uninstalled
Cleaning up…
Exception:
Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/pip/basecommand.py”, line 122, in main
status = self.run(options, args)
File “/usr/lib/python2.7/dist-packages/pip/commands/install.py”, line 295, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File “/usr/lib/python2.7/dist-packages/pip/req.py”, line 1436, in install
requirement.install(install_options, global_options, *args, **kwargs)
File “/usr/lib/python2.7/dist-packages/pip/req.py”, line 672, in install
self.move_wheel_files(self.source_dir, root=root)
File “/usr/lib/python2.7/dist-packages/pip/req.py”, line 902, in move_wheel_files
pycompile=self.pycompile,
File “/usr/lib/python2.7/dist-packages/pip/wheel.py”, line 214, in move_wheel_files
clobber(source, lib_dir, True)
File “/usr/lib/python2.7/dist-packages/pip/wheel.py”, line 204, in clobber
os.makedirs(destdir)
File “/usr/lib/python2.7/os.py”, line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: ‘/usr/local/lib/python2.7/dist-packages/pip’

Storing debug log for failure in /home/didier/.pip/pip.log

$

$

bonsoir,

Votre problème semble à première vu, lier à la déclaration de votre shell.
Normalement, le script d’installation sous Linux utilise le shell “bash” pour s’executer.
Vérifiez que celui-ci n’a pas été remplacer par “dash”: ce dernier est plus optimisé mais moins complet que le précédent.