Error installing mercurial on linux: unable to generate hg.mo - mercurial

I am trying to install mercurial from source. I tried installing mercurial version 3.5 and 3.6 from here: https://www.mercurial-scm.org/release/
My Linux version: Red Hat Enterprise Linux Server release 5.11 (Tikanga)
and my python version: Python 2.6.5
This is the error I get when I try to built it locally.
make local
python setup.py \
build_py -c -d . \
build_ext -i \
build_hgexe -i \
build_mo
running build_py
running build_ext
running build_hgexe
running build_mo
generating mercurial/locale/zh_TW/LC_MESSAGES/hg.mo from i18n/zh_TW.po
msgfmt -v -o mercurial/locale/zh_TW/LC_MESSAGES/hg.mo i18n/zh_TW.po -c
usage: msgfmt [ -dv ] [ - ] [ name ... ]
mercurial/locale/zh_TW/LC_MESSAGES/hg.mo: No such file or directory
error: command 'msgfmt' failed with exit status 2
make: *** [local] Error 1

Looks like you have a msgfmt in your PATH that isn't the one that the installer expects to find.
Do:
which msgfmt
and if the result isn't /usr/bin/msgfmt that's probably the cause

Related

lua require "luasql.mysql" occurs error loading module infomation

i want to use mysql in lua program. But when run require "luasql.mysql",
throws error infomation
error loading module 'luasql.mysql' from file '/usr/local/luarocks/lib/lua/5.4/luasql/mysql.so':
/usr/local/luarocks/lib/lua/5.4/luasql/mysql.so:1: unexpected symbol near '<\207>'
stack traceback:
[C]: in ?
[C]: in function 'require'
stdin:1: in main chunk
[C]: in ?
I install lua and mysql by brew.
which lua is /opt/homebrew/bin/lua, lua -v is Lua 5.4.3 Copyright (C) 1994-2021 Lua.org, PUC-Rio
which mysql is /opt/homebrew/bin/mysql, mysql -V is mysql Ver 8.0.23 for osx10.16 on x86_64 (Homebrew)
install luarocks by luarocks source code, this is the source code website (https://luarocks.github.io/luarocks/releases/ ), luarocks --version is
/usr/local/luarocks/bin/luarocks 3.9.1
LuaRocks main command-line interface
which luarocks is /usr/local/bin/luarocks
Install luasql-mysql by command
luarocks install luasql-mysql MYSQL_INCDIR=/opt/homebrew/Cellar/mysql/8.0.23_1/include/mysql MYSQL_LIBDIR=/opt/homebrew/Cellar/mysql/8.0.23_1/lib
and then the result is
env MACOSX_DEPLOYMENT_TARGET=11.0 gcc -O2 -fPIC -I/opt/homebrew/include/lua5.4 -c src/luasql.c -o src/luasql.o -I/opt/homebrew/Cellar/mysql/8.0.23_1/include/mysql
env MACOSX_DEPLOYMENT_TARGET=11.0 gcc -O2 -fPIC -I/opt/homebrew/include/lua5.4 -c src/ls_mysql.c -o src/ls_mysql.o -I/opt/homebrew/Cellar/mysql/8.0.23_1/include/mysql
env MACOSX_DEPLOYMENT_TARGET=11.0 gcc -bundle -undefined dynamic_lookup -all_load -o luasql/mysql.so src/luasql.o src/ls_mysql.o -L/opt/homebrew/Cellar/mysql/8.0.23_1/lib -lmysqlclient
luasql-mysql 2.6.0-1 is now installed in /usr/local/luarocks (license: MIT/X11)
run luarocks list, the result is
Rocks installed for Lua 5.4
---------------------------
luarocks
3.9.1-1 (installed) - /usr/local/luarocks/lib/luarocks/rocks-5.4
luasql-mysql
2.6.0-1 (installed) - /usr/local/luarocks/lib/luarocks/rocks-5.4
I config export LUA_PATH="/usr/local/luarocks/lib/lua/5.4/?.so;;" in .zshrc profile. When execute print(package.path), the output is
/usr/local/luarocks/lib/lua/5.4/?.so;/opt/homebrew/share/lua/5.4/?.lua;/opt/homebrew/share/lua/5.4/?/init.lua;/opt/homebrew/lib/lua/5.4/?.lua;/opt/homebrew/lib/lua/5.4/?/init.lua;./?.lua;./?/init.lua
so run require "luasql.mysql", i don't know the reason about
error loading module...
how should i solve this problem, is anyone knows?
i expected anyone else tell me how to solve this problem

Mysql 5.6 Installation errors in Mac M1

System version - macOS Monterey (12.4)
Chip - Apple M1 Pro
Objective - I want to install mysql#5.6 using brew as per requirement. Any other methods are also welcomed.
Steps followed -
run command for installing mysql 5.6 (brew install mysql#5.6)
Warning: mysql#5.6 has been deprecated because it is not supported upstream!
Error: mysql#5.6: no bottle available!
You can try to install from source with:
brew install --build-from-source mysql#5.6
Please note building from source is unsupported. You will encounter build
failures with some formulae. If you experience any issues please create pull
requests instead of asking for help on Homebrew's GitHub, Twitter or any other
official channels
run prompted command (brew install --build-from-source mysql#5.6)
Warning: mysql#5.6 has been deprecated because it is not supported upstream!
==> Downloading https://ghcr.io/v2/homebrew/core/cmake/manifests/3.23.2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/cmake/blobs/sha256:46711ae9d567064916561c472b94cba0e939ae72479f6f51ebe98dc6995c4422
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:46711ae9d567064916561c472b94cba0e939ae72479f6f51ebe98dc6995c4422?se=2022-07-04T12%3A45%3A00Z&sig=PNUycLoV8sRSiCs2K38VapK1SXcIrE%2######################################################################## 100.0%
==> Downloading https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.51.tar.gz
==> Downloading from https://cdn.mysql.com//Downloads/MySQL-5.6/mysql-5.6.51.tar.gz
######################################################################## 100.0%
Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
softwareupdate --all --install --force
If that doesn't show you any updates, run:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
Alternatively, manually download them from:
https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 13.4.
==> Installing dependencies for mysql#5.6: cmake
==> Installing mysql#5.6 dependency: cmake
==> Pouring cmake--3.23.2.arm64_monterey.bottle.tar.gz
🍺 /opt/homebrew/Cellar/cmake/3.23.2: 3,043 files, 42.2MB
==> Installing mysql#5.6
==> Patching
==> cmake . -DCOMPILATION_COMMENT=Homebrew -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DINSTALL_DOCDIR=share/doc/mysql#5.6 -DINSTALL_INCLUDEDIR=include/mysql -DINSTALL_INFODIR=share/info -DINSTALL_M==> make
Last 15 lines from /Users/amangautam/Library/Logs/Homebrew/mysql#5.6/02.make:
[ 9%] Building C object extra/libevent/CMakeFiles/event.dir/evrpc.c.o
cd /tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/extra/libevent && /opt/homebrew/Library/Homebrew/shims/mac/super/clang -DHAVE_CONFIG_H -DHAVE_LIBEVENT2 -DHAVE_TLSv13 -I/tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/extra/libevent/include -I/tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/extra/libevent/compat -I/tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/extra/libevent -I/tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/include -isystem /tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/zlib -fPIC -Wno-error=deprecated-declarations -Qunused-arguments -O3 -DNDEBUG -DDBUG_OFF -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -MD -MT extra/libevent/CMakeFiles/event.dir/evrpc.c.o -MF CMakeFiles/event.dir/evrpc.c.o.d -o CMakeFiles/event.dir/evrpc.c.o -c /tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/extra/libevent/evrpc.c
[ 9%] Linking C static library lib/libevent_extra.a
cd /tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/extra/libevent && /opt/homebrew/Cellar/cmake/3.23.2/bin/cmake -P CMakeFiles/event_extra.dir/cmake_clean_target.cmake
cd /tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/extra/libevent && /opt/homebrew/Cellar/cmake/3.23.2/bin/cmake -E cmake_link_script CMakeFiles/event_extra.dir/link.txt --verbose=1
/usr/bin/ar qc lib/libevent_extra.a CMakeFiles/event_extra.dir/buffer.c.o CMakeFiles/event_extra.dir/bufferevent.c.o CMakeFiles/event_extra.dir/bufferevent_filter.c.o CMakeFiles/event_extra.dir/bufferevent_pair.c.o CMakeFiles/event_extra.dir/bufferevent_ratelim.c.o CMakeFiles/event_extra.dir/bufferevent_sock.c.o CMakeFiles/event_extra.dir/event.c.o CMakeFiles/event_extra.dir/evmap.c.o CMakeFiles/event_extra.dir/evthread.c.o CMakeFiles/event_extra.dir/evutil.c.o CMakeFiles/event_extra.dir/evutil_rand.c.o CMakeFiles/event_extra.dir/evutil_time.c.o CMakeFiles/event_extra.dir/listener.c.o CMakeFiles/event_extra.dir/log.c.o CMakeFiles/event_extra.dir/signal.c.o CMakeFiles/event_extra.dir/strlcpy.c.o CMakeFiles/event_extra.dir/select.c.o CMakeFiles/event_extra.dir/poll.c.o CMakeFiles/event_extra.dir/kqueue.c.o CMakeFiles/event_extra.dir/evthread_pthread.c.o CMakeFiles/event_extra.dir/event_tagging.c.o CMakeFiles/event_extra.dir/http.c.o CMakeFiles/event_extra.dir/evdns.c.o CMakeFiles/event_extra.dir/evrpc.c.o
/usr/bin/ranlib lib/libevent_extra.a
[ 9%] Built target event_extra
[ 9%] Linking C static library lib/libevent.a
cd /tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/extra/libevent && /opt/homebrew/Cellar/cmake/3.23.2/bin/cmake -P CMakeFiles/event.dir/cmake_clean_target.cmake
cd /tmp/mysqlA5.6-20220704-17683-15afkyt/mysql-5.6.51/extra/libevent && /opt/homebrew/Cellar/cmake/3.23.2/bin/cmake -E cmake_link_script CMakeFiles/event.dir/link.txt --verbose=1
/usr/bin/ar qc lib/libevent.a CMakeFiles/event.dir/buffer.c.o CMakeFiles/event.dir/bufferevent.c.o CMakeFiles/event.dir/bufferevent_filter.c.o CMakeFiles/event.dir/bufferevent_pair.c.o CMakeFiles/event.dir/bufferevent_ratelim.c.o CMakeFiles/event.dir/bufferevent_sock.c.o CMakeFiles/event.dir/event.c.o CMakeFiles/event.dir/evmap.c.o CMakeFiles/event.dir/evthread.c.o CMakeFiles/event.dir/evutil.c.o CMakeFiles/event.dir/evutil_rand.c.o CMakeFiles/event.dir/evutil_time.c.o CMakeFiles/event.dir/listener.c.o CMakeFiles/event.dir/log.c.o CMakeFiles/event.dir/signal.c.o CMakeFiles/event.dir/strlcpy.c.o CMakeFiles/event.dir/select.c.o CMakeFiles/event.dir/poll.c.o CMakeFiles/event.dir/kqueue.c.o CMakeFiles/event.dir/evthread_pthread.c.o CMakeFiles/event.dir/event_tagging.c.o CMakeFiles/event.dir/http.c.o CMakeFiles/event.dir/evdns.c.o CMakeFiles/event.dir/evrpc.c.o
/usr/bin/ranlib lib/libevent.a
[ 9%] Built target event
make: *** [all] Error 2
Do not report this issue to Homebrew/brew or Homebrew/core!
Error: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
softwareupdate --all --install --force
If that doesn't show you any updates, run:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
Alternatively, manually download them from:
https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 13.4.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels.
As per above response, I did system update and again ran same command (brew install --build-from-source mysql#5.6)
Running `brew update --auto-update`...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
editorconfig-checker
Warning: mysql#5.6 has been deprecated because it is not supported upstream!
==> Downloading https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.51.tar.gz
Already downloaded: /Users/amangautam/Library/Caches/Homebrew/downloads/050b4768f405f6217eaccbda4b2f0c5ba8ded872cf62408677fcf7883cfe82ea--mysql-5.6.51.tar.gz
==> Patching
==> cmake . -DCOMPILATION_COMMENT=Homebrew -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DINSTALL_DOCDIR=share/doc/mysql#5.6 -DINSTALL_INCLUDEDIR=include/mysql -DINSTALL_INFODIR=share/info -DINSTALL_M
==> make
Last 15 lines from /Users/amangautam/Library/Logs/Homebrew/mysql#5.6/02.make:
[ 9%] Building C object extra/libevent/CMakeFiles/event_extra.dir/evrpc.c.o
cd /tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/extra/libevent && /opt/homebrew/Library/Homebrew/shims/mac/super/clang -DHAVE_CONFIG_H -DHAVE_LIBEVENT2 -DHAVE_TLSv13 -I/tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/extra/libevent/include -I/tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/extra/libevent/compat -I/tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/extra/libevent -I/tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/include -isystem /tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/zlib -fPIC -Wno-error=deprecated-declarations -Qunused-arguments -O3 -DNDEBUG -DDBUG_OFF -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -MD -MT extra/libevent/CMakeFiles/event_extra.dir/evrpc.c.o -MF CMakeFiles/event_extra.dir/evrpc.c.o.d -o CMakeFiles/event_extra.dir/evrpc.c.o -c /tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/extra/libevent/evrpc.c
[ 9%] Linking C static library lib/libevent_extra.a
cd /tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/extra/libevent && /opt/homebrew/Cellar/cmake/3.23.2/bin/cmake -P CMakeFiles/event_extra.dir/cmake_clean_target.cmake
cd /tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/extra/libevent && /opt/homebrew/Cellar/cmake/3.23.2/bin/cmake -E cmake_link_script CMakeFiles/event_extra.dir/link.txt --verbose=1
/usr/bin/ar qc lib/libevent_extra.a CMakeFiles/event_extra.dir/buffer.c.o CMakeFiles/event_extra.dir/bufferevent.c.o CMakeFiles/event_extra.dir/bufferevent_filter.c.o CMakeFiles/event_extra.dir/bufferevent_pair.c.o CMakeFiles/event_extra.dir/bufferevent_ratelim.c.o CMakeFiles/event_extra.dir/bufferevent_sock.c.o CMakeFiles/event_extra.dir/event.c.o CMakeFiles/event_extra.dir/evmap.c.o CMakeFiles/event_extra.dir/evthread.c.o CMakeFiles/event_extra.dir/evutil.c.o CMakeFiles/event_extra.dir/evutil_rand.c.o CMakeFiles/event_extra.dir/evutil_time.c.o CMakeFiles/event_extra.dir/listener.c.o CMakeFiles/event_extra.dir/log.c.o CMakeFiles/event_extra.dir/signal.c.o CMakeFiles/event_extra.dir/strlcpy.c.o CMakeFiles/event_extra.dir/select.c.o CMakeFiles/event_extra.dir/poll.c.o CMakeFiles/event_extra.dir/kqueue.c.o CMakeFiles/event_extra.dir/evthread_pthread.c.o CMakeFiles/event_extra.dir/event_tagging.c.o CMakeFiles/event_extra.dir/http.c.o CMakeFiles/event_extra.dir/evdns.c.o CMakeFiles/event_extra.dir/evrpc.c.o
/usr/bin/ranlib lib/libevent_extra.a
[ 9%] Built target event_extra
[ 9%] Linking C static library lib/libevent.a
cd /tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/extra/libevent && /opt/homebrew/Cellar/cmake/3.23.2/bin/cmake -P CMakeFiles/event.dir/cmake_clean_target.cmake
cd /tmp/mysqlA5.6-20220704-3462-1u6glir/mysql-5.6.51/extra/libevent && /opt/homebrew/Cellar/cmake/3.23.2/bin/cmake -E cmake_link_script CMakeFiles/event.dir/link.txt --verbose=1
/usr/bin/ar qc lib/libevent.a CMakeFiles/event.dir/buffer.c.o CMakeFiles/event.dir/bufferevent.c.o CMakeFiles/event.dir/bufferevent_filter.c.o CMakeFiles/event.dir/bufferevent_pair.c.o CMakeFiles/event.dir/bufferevent_ratelim.c.o CMakeFiles/event.dir/bufferevent_sock.c.o CMakeFiles/event.dir/event.c.o CMakeFiles/event.dir/evmap.c.o CMakeFiles/event.dir/evthread.c.o CMakeFiles/event.dir/evutil.c.o CMakeFiles/event.dir/evutil_rand.c.o CMakeFiles/event.dir/evutil_time.c.o CMakeFiles/event.dir/listener.c.o CMakeFiles/event.dir/log.c.o CMakeFiles/event.dir/signal.c.o CMakeFiles/event.dir/strlcpy.c.o CMakeFiles/event.dir/select.c.o CMakeFiles/event.dir/poll.c.o CMakeFiles/event.dir/kqueue.c.o CMakeFiles/event.dir/evthread_pthread.c.o CMakeFiles/event.dir/event_tagging.c.o CMakeFiles/event.dir/http.c.o CMakeFiles/event.dir/evdns.c.o CMakeFiles/event.dir/evrpc.c.o
/usr/bin/ranlib lib/libevent.a
[ 9%] Built target event
make: *** [all] Error 2
Do not report this issue to Homebrew/brew or Homebrew/core!
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels.
getting the same make error. I searched on google but not found anything relevant.
Since you're trying to install a deprecated package that won't be translated to the M1 architecture, my recommendation is to use Rosetta to install it.
You can follow the steps here to setup a terminal running with Rosetta.
You'll know you're in a Rosetta terminal when you get i386 when running the arch command in your terminal.
Perform the installation steps there using homebrew. Please note the slightly different installation folder when installing with a Rosetta terminal vs native terminal.
The service should run using brew services start mysql#5.6.

django AWS EB CLI Unable to deploy with mysqlclient

I have been attempting to deploy my Django project up on AWS ElasticBeanstalk via EB CLI n my local Pycharm project with the built in terminal.
Having setup IAM/group (through aws web console) I migrated and ran server locally (Pycharm terminal) and all works fine, and then created env/instance and requirements.txt and deployed using EB CLI in Pycharm and this also worked fine.
I setup a database connection on RDS (AWS web Console) then changed settings to connect to mysql, pip installed mysqlclient, migrate and ran locally (Pycharm terminal) and again all works fine.
However, when I try to deply the project again with mysqlclient installed I get errors and I just cannot figure out why.
Platform: arn:aws:elasticbeanstalk:us-west-2::platform/Python 3.7 running on 64bit Amazon Linux 2/3.3.7
Requirements.txt
asgiref==3.4.1
cement==2.8.2
certifi==2021.10.8
charset-normalizer==2.0.7
colorama==0.4.3
Django==3.2.9
django-storages==1.12.3
future==0.16.0
idna==3.3
jmespath==0.10.0
mysqlclient
pathspec==0.5.9
python-dateutil==2.8.2
pytz==2021.3
PyYAML==5.4.1
requests==2.26.0
s3transfer==0.5.0
semantic-version==2.8.5
six==1.14.0
sqlparse==0.4.2
termcolor==1.1.0
typing-extensions==3.10.0.2
urllib3==1.26.7
wcwidth==0.1.9
.ebextensions/django.config
option_settings:
aws:elasticbeanstalk:container:python:
WSGIPath: awsdeploy.wsgi:application
aws:elasticbeanstalk:environment:proxy:staticfiles:
/static: static
container_commands:
01_collectstatic:
command: "source /var/app/venv/staging-LQM1lest/bin/activate && python manage.py collectstatic --noinput --clear"
02_migrate:
command: "source /var/app/venv/staging-LQM1lest/bin/activate && python manage.py migrate --noinput"
leader_only: true
.ebextensions/packages.config
packages:
yum:
python3-devel: []
mariadb-devel: []
EB Error Logs
Collecting mysqlclient==2.0.3
Using cached mysqlclient-2.0.3.tar.gz (88 kB)
2021/11/11 02:10:40.712344 [ERROR] An error occurred during execution of command [app-deploy] - [InstallDependency]. Stop running the command. Error: fail to install dependencies with requirements.txt file with error Command /bin/sh -c /var/app/venv/staging-LQM1lest/bin/pip install -r requirements.txt failed wi
th error exit status 1. Stderr: ERROR: Command errored out with exit status 1:
command: /var/app/venv/staging-LQM1lest/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-isj_ea8s/mysqlclient_f221eb2ed3c44d6e868da4539588d2a4/setup.py'"'"'; __file__='"'"'/tmp/pip-install-isj_ea8s/mysqlclient_f221eb2ed3c44d6e868da4539588d2a4/setup.py'"'"';f = ge
tattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-hzv5pj6h
cwd: /tmp/pip-install-isj_ea8s/mysqlclient_f221eb2ed3c44d6e868da4539588d2a4/
Complete output (15 lines):
/bin/sh: mysql_config: command not found
/bin/sh: mariadb_config: command not found
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-isj_ea8s/mysqlclient_f221eb2ed3c44d6e868da4539588d2a4/setup.py", line 15, in <module>
metadata, options = get_config()
File "/tmp/pip-install-isj_ea8s/mysqlclient_f221eb2ed3c44d6e868da4539588d2a4/setup_posix.py", line 70, in get_config
libs = mysql_config("libs")
File "/tmp/pip-install-isj_ea8s/mysqlclient_f221eb2ed3c44d6e868da4539588d2a4/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
mysql_config --version
mariadb_config --version
mysql_config --libs
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/3c/df/59cd2fa5e48d0804d213bdcb1acb4d08c403b61c7ff7ed4dd4a6a2deb3f7/mysqlclient-2.0.3.tar.gz#sha256=f6ebea7c008f155baeefe16c56cd3ee6239f7a5a9ae42396c2f1860f08a7c432 (from https://pypi.org/simple/mysqlclient/) (requires-python:>=3.5). Command errored out
with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement mysqlclient==2.0.3 (from versions: 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8, 1.3.9, 1.3.10, 1.3.11rc1, 1.3.11, 1.3.12, 1.3.13, 1.3.14, 1.4.0rc1, 1.4.0rc2, 1.4.0rc3, 1.4.0, 1.4.1, 1.4.2, 1.4.2.post1, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 2
.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0rc1)
ERROR: No matching distribution found for mysqlclient==2.0.3
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the '/var/app/venv/staging-LQM1lest/bin/python -m pip install --upgrade pip' command.
2021/11/11 02:10:40.712360 [INFO] Executing cleanup logic
2021/11/11 02:10:40.712489 [INFO] CommandService Response: {"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"Engine execution has encountered an error.","returncode":1,"events":[{"msg":"Instance deployment failed to install application dependencies. The deployment failed.","timestamp
":1636596640,"severity":"ERROR"},{"msg":"Instance deployment failed. For details, see 'eb-engine.log'.","timestamp":1636596640,"severity":"ERROR"}]}]}
2021/11/11 02:10:40.712674 [INFO] Platform Engine finished execution on command: app-deploy
I don't understand why prior to installing mysqlclient it's managed to deploy install all my packages from requirements file successfully but fails when mysqlclient was added - what am I missing?
Help is much appreciated, happy to share any other details if needed. Thanks
Edit
I came across the answer on this link: [https://stackoverflow.com/questions/67344766/error-encountered-while-installing-dependencies-for-flask-mysql-application-usin][1]
And created the .ebextensions/packages.config as suggested and removed version from mysqlclient within my requirements.txt file - updated above code.
Now mysqlclient appears to have installed succssfully but now get the following error:
New EB Error Logs
An error occurred during execution of command [app-deploy] - [PostBuildEbExtension]. Stop running the command. Error: container commands build failed. Please refer to /var/log/cfn-init.log for more details.
I'm also not sure how to check this log /var/log/cfn-init.log, when I go to the web console I can't see any eb instances listed or any logs.

Error installing RMySQL to run in Docker on Mac OS X

I am trying to run MySQL in an R script running inside a Docker (actually Rocker) container, but am getting an error on the “install_packages(…” step. The only solution I found that was somewhat similar was specific to running RedHat Linux (I am running Mac OS X 10.15) and the solution included pointing to several directories that I do not have. Running under RStudio or from the command line, RMySQL loads without a problem.
Dockerfile:
FROM rocker/r-ver:latest
RUN mkdir /home/analysis
COPY install_packages.R /home/analysis/install_packages.R
COPY script_basic.R /home/analysis/script_basic.R
RUN Rscript /home/analysis/install_packages.R
CMD Rscript /home/analysis/script_basic.R
R files:
script_basic.R
library( RMySQL )
install_packages.R
install_packages(“RMySQL”)
Commands and responses:
$ docker build -t myapp .
…
Successfully tagged myapp:latest
$ docker run -it --rm myapp
Loading required package: DBI
Error: package or namespace load failed for ‘RMySQL’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/usr/local/lib/R/site-library/RMySQL/libs/RMySQL.so':
libmysqlclient.so.21: cannot open shared object file: No such file or directory
Execution halted
$
I believe that rocker/r-dev does not include the libraries you need to get this to run. Untested, but try something like this.
Dockerfile
FROM rocker/r-ver:latest
RUN mkdir /home/analysis
RUN apt-get update \
&& apt-get install -y --no-install-recommends libmariadbclient-dev
COPY install_packages.R /home/analysis/install_packages.R
COPY script_basic.R /home/analysis/script_basic.R
RUN Rscript /home/analysis/install_packages.R
CMD Rscript /home/analysis/script_basic.R
You can find the need for certain libraries on https://cran.r-project.org/web/packages/RMySQL/index.html, as
SystemRequirements: libmariadb-client-dev | libmariadb-client-lgpl-dev | libmysqlclient-dev (deb), mariadb-devel (rpm), mariadb | mysql-connector-c (brew), mysql56_dev (csw)
and a note on how to install them in RMySQL's github README.md's Installation section.
(The CRAN page references libmysqlclient-dev, but the github page suggests "the mariadb implementation is much better". I don't know the premise of the statement, just explaining why I suggested one and CRAN listed another.)

Cygnus JAVA_HOME is not set

I installed cygnus and when I hit sudo service cygnus start I get the status OK running.
But the log file says:
Warning: JAVA_HOME is not set!
+ exec /usr/bin/java -Xmx20m -Dflume.log.file=cygnus.log -cp '/usr/cygnus/conf:/usr/cygnus/lib/*:/usr/cygnus/plugins.d/cygnus/lib/*:/usr/cygnus/plugins.d/cygnus/libext/*' -Djava.library.path= es.tid.fiware.fiwareconnectors.cygnus.nodes.CygnusApplication -p 8081 -f /usr/cygnus/conf/agent_1.conf -n cygnusagent
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/cygnus/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/cygnus/plugins.d/cygnus/lib/cygnus-0.7.1-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
I checked echo $JAVA_HOME and get:
/usr/lib/jvm/java-1.6.0-openjdk.x86_64
I also checked java -version and got:
java version "1.6.0_35"
OpenJDK Runtime Environment (IcedTea6 1.13.7) (rhel-1.13.7.1.el6_6-x86_64)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
So what am I missing here?
I did all these steps here:
Installing Cygnus
Open a terminal and simply configure the FIWARE repository if not yet
configured and use your applications manager in order to install the
latest version of Cy gnus (CentOS/RedHat example):
$ sudo cat > /etc/yum.repos.d/fiware.repo <http://repositories.testbed.fi-ware.eu/repo/rpm/x86_64/
gpgcheck=0 enabled=1 EOL $ sudo yum install cygnus
IMPORTANT NOTE:
Cygnus, as it is based on Apache Flume, needs Java SDK is installed.
If not yet installed, do it right now:
$ sudo yum install java-1.6.0-openjdk-devel
Remember to export the JAVA_HOME environment variable. In the case you
have installed Java SDK right now as shown above, this would be as:
$ export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk.x86_64
In order to do it permanently, edit /root/.bash_profile (root user) or
/etc/profile (other users).
Despite such a warning message, Cygus will run since the flume-ng (and derived cygnus-flume-ng) script looks for Java if JAVA_HOME is not set:
# find java
if [ -z "${JAVA_HOME}" ] ; then
warn "JAVA_HOME is not set!"
# Try to use Bigtop to autodetect JAVA_HOME if it's available
if [ -e /usr/libexec/bigtop-detect-javahome ] ; then
. /usr/libexec/bigtop-detect-javahome
elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ] ; then
. /usr/lib/bigtop-utils/bigtop-detect-javahome
fi
# Using java from path if bigtop is not installed or couldn't find it
if [ -z "${JAVA_HOME}" ] ; then
JAVA_DEFAULT=$(type -p java)
[ -n "$JAVA_DEFAULT" ] || error "Unable to find java executable. Is it in your PATH?" 1
JAVA_HOME=$(cd $(dirname $JAVA_DEFAULT)/..; pwd)
fi
fi