[RESOLVED] Install script failing on Raspberry Pi model 2B

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
#1
I get the following error message:
Code:
Installing required Python modules...
Collecting mysql
Collecting MySQL-python
  Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
Collecting mysql-connector
Collecting wget
Building wheels for collected packages: MySQL-python
  Running setup.py bdist_wheel for MySQL-python ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Zjx58n/MySQL-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmptdBSvSpip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-armv7l-2.7
  copying _mysql_exceptions.py -> build/lib.linux-armv7l-2.7
  creating build/lib.linux-armv7l-2.7/MySQLdb
  copying MySQLdb/__init__.py -> build/lib.linux-armv7l-2.7/MySQLdb
  copying MySQLdb/converters.py -> build/lib.linux-armv7l-2.7/MySQLdb
  copying MySQLdb/connections.py -> build/lib.linux-armv7l-2.7/MySQLdb
  copying MySQLdb/cursors.py -> build/lib.linux-armv7l-2.7/MySQLdb
  copying MySQLdb/release.py -> build/lib.linux-armv7l-2.7/MySQLdb
  copying MySQLdb/times.py -> build/lib.linux-armv7l-2.7/MySQLdb
  creating build/lib.linux-armv7l-2.7/MySQLdb/constants
  copying MySQLdb/constants/__init__.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
  copying MySQLdb/constants/CR.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
  copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
  copying MySQLdb/constants/ER.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
  copying MySQLdb/constants/FLAG.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
  copying MySQLdb/constants/REFRESH.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
  copying MySQLdb/constants/CLIENT.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
  running build_ext
  building '_mysql' extension
  creating build/temp.linux-armv7l-2.7
  arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-HeKf1z/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-armv7l-2.7/_mysql.o
  In file included from _mysql.c:46:0:
  /usr/include/mysql/mysql.h:285:14: error: duplicate member ‘reconnect’
   unsigned int reconnect;
                ^~~~~~~~~
  /usr/include/mysql/mysql.h:288:11: error: duplicate member ‘reconnect’
     my_bool reconnect;  /* set to 1 if automatic reconnect */
             ^~~~~~~~~
  error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for MySQL-python
  Running setup.py clean for MySQL-python
Failed to build MySQL-python
Installing collected packages: MySQL-python, mysql, mysql-connector, wget
  Running setup.py install for MySQL-python ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Zjx58n/MySQL-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-2N5i3k-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-armv7l-2.7
    copying _mysql_exceptions.py -> build/lib.linux-armv7l-2.7
    creating build/lib.linux-armv7l-2.7/MySQLdb
    copying MySQLdb/__init__.py -> build/lib.linux-armv7l-2.7/MySQLdb
    copying MySQLdb/converters.py -> build/lib.linux-armv7l-2.7/MySQLdb
    copying MySQLdb/connections.py -> build/lib.linux-armv7l-2.7/MySQLdb
    copying MySQLdb/cursors.py -> build/lib.linux-armv7l-2.7/MySQLdb
    copying MySQLdb/release.py -> build/lib.linux-armv7l-2.7/MySQLdb
    copying MySQLdb/times.py -> build/lib.linux-armv7l-2.7/MySQLdb
    creating build/lib.linux-armv7l-2.7/MySQLdb/constants
    copying MySQLdb/constants/__init__.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
    copying MySQLdb/constants/CR.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
    copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
    copying MySQLdb/constants/ER.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
    copying MySQLdb/constants/FLAG.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
    copying MySQLdb/constants/REFRESH.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
    copying MySQLdb/constants/CLIENT.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
    running build_ext
    building '_mysql' extension
    creating build/temp.linux-armv7l-2.7
    arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-HeKf1z/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-armv7l-2.7/_mysql.o
    In file included from _mysql.c:46:0:
    /usr/include/mysql/mysql.h:285:14: error: duplicate member ‘reconnect’
     unsigned int reconnect;
                  ^~~~~~~~~
    /usr/include/mysql/mysql.h:288:11: error: duplicate member ‘reconnect’
       my_bool reconnect;  /* set to 1 if automatic reconnect */
               ^~~~~~~~~
    error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Zjx58n/MySQL-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-2N5i3k-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-Zjx58n/MySQL-python/
Errors on installing required packages

---- Checking installation of required packages for Keexybox ----

Checking installed packages
mariadb-server: OK
mariadb-client: OK
default-libmysqlclient-dev: OK
apache2: OK
libapache2-mod-php: OK
bridge-utils: OK
sudo: OK
ntp: OK
acl: OK
arp-scan: OK
php: OK
php-gettext: OK
php-gd: OK
php-intl: OK
php-json: OK
php-mysql: OK
php-readline: OK
php-curl: OK
python-pip: OK
python-dev: OK
python-mysqldb: OK
libproc-daemon-perl: OK
libfile-pid-perl: OK

Checking installed python modules
mysql: FAILED
MySQL-python: FAILED
mysql-connector: FAILED
wget: FAILED

-----------------------------------------------
Some required packages for Keexybox are missing
Installation aborted!
-----------------------------------------------


Upon inspection of the header file, it is a bit surprising to find reconnect being attempted to be defined in multiple places:

Code:
unsigned int reconnect;
unsigned int reconnect;
  enum mysql_status status;
  my_bool       free_me;                /* If free in mysql_close */
  my_bool       reconnect;              /* set to 1 if automatic reconnect */


Upon further re-runs and inspection, it appears that something is inserting the line below when it shouldn't and it's inserting it in a rather dumb way (doesn't check if this already exists and inserts it regardless)
Code:
unsigned int reconnect;


Upon checking further, the following code in "keexybox_21.04.2_raspios10/util/install_scripts/02_install_required_pkg.sh" seems to be adding the offending line:
Code:
# Fix issue when install MySQL connector for Python
sed '/st_mysql_options options;/a unsigned int reconnect;' /usr/include/mysql/mysql.h -i.bkp


Commenting out the 'sed' line as in below fixed the problem in the original post for me:

Code:
# Fix issue when install MySQL connector for Python
# sed '/st_mysql_options options;/a unsigned int reconnect;' /usr/include/mysql/mysql.h -i.bkp
Reply
#1
I get the following error message:
Code:
Installing required Python modules...
Collecting mysql
Collecting MySQL-python
  Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
Collecting mysql-connector
Collecting wget
Building wheels for collected packages: MySQL-python
  Running setup.py bdist_wheel for MySQL-python ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Zjx58n/MySQL-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmptdBSvSpip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-armv7l-2.7
  copying _mysql_exceptions.py -> build/lib.linux-armv7l-2.7
  creating build/lib.linux-armv7l-2.7/MySQLdb
  copying MySQLdb/__init__.py -> build/lib.linux-armv7l-2.7/MySQLdb
  copying MySQLdb/converters.py -> build/lib.linux-armv7l-2.7/MySQLdb
  copying MySQLdb/connections.py -> build/lib.linux-armv7l-2.7/MySQLdb
  copying MySQLdb/cursors.py -> build/lib.linux-armv7l-2.7/MySQLdb
  copying MySQLdb/release.py -> build/lib.linux-armv7l-2.7/MySQLdb
  copying MySQLdb/times.py -> build/lib.linux-armv7l-2.7/MySQLdb
  creating build/lib.linux-armv7l-2.7/MySQLdb/constants
  copying MySQLdb/constants/__init__.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
  copying MySQLdb/constants/CR.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
  copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
  copying MySQLdb/constants/ER.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
  copying MySQLdb/constants/FLAG.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
  copying MySQLdb/constants/REFRESH.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
  copying MySQLdb/constants/CLIENT.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
  running build_ext
  building '_mysql' extension
  creating build/temp.linux-armv7l-2.7
  arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-HeKf1z/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-armv7l-2.7/_mysql.o
  In file included from _mysql.c:46:0:
  /usr/include/mysql/mysql.h:285:14: error: duplicate member ‘reconnect’
   unsigned int reconnect;
                ^~~~~~~~~
  /usr/include/mysql/mysql.h:288:11: error: duplicate member ‘reconnect’
     my_bool reconnect;  /* set to 1 if automatic reconnect */
             ^~~~~~~~~
  error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for MySQL-python
  Running setup.py clean for MySQL-python
Failed to build MySQL-python
Installing collected packages: MySQL-python, mysql, mysql-connector, wget
  Running setup.py install for MySQL-python ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Zjx58n/MySQL-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-2N5i3k-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-armv7l-2.7
    copying _mysql_exceptions.py -> build/lib.linux-armv7l-2.7
    creating build/lib.linux-armv7l-2.7/MySQLdb
    copying MySQLdb/__init__.py -> build/lib.linux-armv7l-2.7/MySQLdb
    copying MySQLdb/converters.py -> build/lib.linux-armv7l-2.7/MySQLdb
    copying MySQLdb/connections.py -> build/lib.linux-armv7l-2.7/MySQLdb
    copying MySQLdb/cursors.py -> build/lib.linux-armv7l-2.7/MySQLdb
    copying MySQLdb/release.py -> build/lib.linux-armv7l-2.7/MySQLdb
    copying MySQLdb/times.py -> build/lib.linux-armv7l-2.7/MySQLdb
    creating build/lib.linux-armv7l-2.7/MySQLdb/constants
    copying MySQLdb/constants/__init__.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
    copying MySQLdb/constants/CR.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
    copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
    copying MySQLdb/constants/ER.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
    copying MySQLdb/constants/FLAG.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
    copying MySQLdb/constants/REFRESH.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
    copying MySQLdb/constants/CLIENT.py -> build/lib.linux-armv7l-2.7/MySQLdb/constants
    running build_ext
    building '_mysql' extension
    creating build/temp.linux-armv7l-2.7
    arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-HeKf1z/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-armv7l-2.7/_mysql.o
    In file included from _mysql.c:46:0:
    /usr/include/mysql/mysql.h:285:14: error: duplicate member ‘reconnect’
     unsigned int reconnect;
                  ^~~~~~~~~
    /usr/include/mysql/mysql.h:288:11: error: duplicate member ‘reconnect’
       my_bool reconnect;  /* set to 1 if automatic reconnect */
               ^~~~~~~~~
    error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Zjx58n/MySQL-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-2N5i3k-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-Zjx58n/MySQL-python/
Errors on installing required packages

---- Checking installation of required packages for Keexybox ----

Checking installed packages
mariadb-server: OK
mariadb-client: OK
default-libmysqlclient-dev: OK
apache2: OK
libapache2-mod-php: OK
bridge-utils: OK
sudo: OK
ntp: OK
acl: OK
arp-scan: OK
php: OK
php-gettext: OK
php-gd: OK
php-intl: OK
php-json: OK
php-mysql: OK
php-readline: OK
php-curl: OK
python-pip: OK
python-dev: OK
python-mysqldb: OK
libproc-daemon-perl: OK
libfile-pid-perl: OK

Checking installed python modules
mysql: FAILED
MySQL-python: FAILED
mysql-connector: FAILED
wget: FAILED

-----------------------------------------------
Some required packages for Keexybox are missing
Installation aborted!
-----------------------------------------------


Upon inspection of the header file, it is a bit surprising to find reconnect being attempted to be defined in multiple places:

Code:
unsigned int reconnect;
unsigned int reconnect;
  enum mysql_status status;
  my_bool       free_me;                /* If free in mysql_close */
  my_bool       reconnect;              /* set to 1 if automatic reconnect */


Upon further re-runs and inspection, it appears that something is inserting the line below when it shouldn't and it's inserting it in a rather dumb way (doesn't check if this already exists and inserts it regardless)
Code:
unsigned int reconnect;


Upon checking further, the following code in "keexybox_21.04.2_raspios10/util/install_scripts/02_install_required_pkg.sh" seems to be adding the offending line:
Code:
# Fix issue when install MySQL connector for Python
sed '/st_mysql_options options;/a unsigned int reconnect;' /usr/include/mysql/mysql.h -i.bkp


Commenting out the 'sed' line as in below fixed the problem in the original post for me:

Code:
# Fix issue when install MySQL connector for Python
# sed '/st_mysql_options options;/a unsigned int reconnect;' /usr/include/mysql/mysql.h -i.bkp
Reply


Messages In This Thread
[RESOLVED] Install script failing on Raspberry Pi model 2B - by m_keexybox_user - 01-03-2023, 02:22 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)