When attempting to compile Gearman on Mac OSX with Homebrew, I get the following error:
brew install gearman --with-mysql
libtool: compile: clang++ -DHAVE_CONFIG_H -I. -fvisibility=hidden -I/usr/include -D_THREAD_SAFE -DBUILDING_LIBGEARMAN -DHAVE_HTONLL -std=c++0x -g -O2 -Wno-unknown-pragmas -Qunused-arguments -Wall -Wextra -Wno-attributes -Wvarargs -Waddress -Warray-bounds -Wchar-subscripts -Wcomment -Wctor-dtor-privacy -Wfloat-equal -Wformat=2 -Wformat-y2k -Wmissing-field-initializers -Wnon-virtual-dtor -Woverloaded-virtual -Wpointer-arith -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wswitch-enum -Wundef -Wc++11-compat -Wunused -Wunused-result -Wunused-variable -Wunused-parameter -Wwrite-strings -Wformat-security -fwrapv -pipe -Wsizeof-pointer-memaccess -Wpacked -c libgearman-server/plugins/queue/mysql/queue.cc -fno-common -DPIC -o libgearman-server/plugins/queue/mysql/.libs/libgearman_server_libgearman_server_la-queue.o
libgearman-server/plugins/queue/mysql/queue.cc:49:10: fatal error: 'mysql.h' file not found
#include <mysql.h>
^
1 error generated
I am using MariaDB instead of MySQL - and I suspect this may be the cause.
As a quick and easy workaround:
brew edit gearman
Look for this line:
args << (build.with?("mysql") ? "--with-mysql=#{Formula["mysql"].opt_bin}/mysql_config" : "--without-mysql")
And change Formula["mysql"] to Formula["mariadb"]
Run brew install gearman --with-mysql again and it will compile successfully.
Related
I'm trying to get a mysql database set up on my dreamhost shared server but it seems I can't proceed without mysqlclient. When I try pip install mysqlclient however i get
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -Dversion_info=(1,3,12,'final',0) -D__version__=1.3.12 -I/usr/include/mysql -I/usr/include/python3.4m -I/home/eptaba/aeromembers.com/AeroMembers_env/include/python3.4m -c _mysql.c -o build/temp.linux-x86_64-3.4/_mysql.o -DBIG_JOINS=1 -fno-strict-aliasing -g -DNDEBUG
_mysql.c:32:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
I've seen in other answers that these types of problems can be solved with
apt-get install python3.4-dev
But being on dreamhost's shared server product i'm not able to execute that command. Is there anything else I can do to either get mysqlclient or set up my mysql without it?
I got around this by installing Python 3.6 and using that in my virtualenv instead of Python 3.4. Afterwards I was able to pip install mysqlclient
Base image is python:3
Requirements.txt:
Django==2.0.2
django-auth-ldap==1.3.0
django-bootstrap3==9.1.0
django-crispy-forms==1.7.0
django-extensions==2.0.0
django-filter==1.1.0
djangorestframework==3.7.7
Markdown==2.6.11
psycopg2==2.7.4
psycopg2-binary==2.7.4
pyldap==2.4.45
pytz==2018.3
six==1.11.0
typing==3.6.4
Getting this error when I build the image:
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=2.4.45 -IModules -I/usr/include -I/usr/include/sasl -I/usr/local/include -I/usr/local/include/sasl -I/usr/local/include/python3.6m -c Modules/LDAPObject.c -o build/temp.linux-x86_64-3.6/Modules/LDAPObject.o
In file included from Modules/LDAPObject.c:8:0:
Modules/errors.h:7:18: fatal error: lber.h: No such file or directory
#include "lber.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
yum is not installed on base image so I can't add a RUN statement to install the dependency lber.h. Any ideas how to get around this?
While installing a package in R, I am getting error message in mu ubuntu 16.04 machine as shown belo dur t lack of tcl/tlk header. How to resolve it?
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/usr/include/tcl8.6 -I/usr/include/tcl8.6 -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c tcltkimg.c -o tcltkimg.o
tcltkimg.c:2:16: fatal error: tk.h: No such file or directory
You need to add the tk-dev package to your system (e.g., with apt-get) as that contains the tk.h file; the command line invocation you need is (probably):
sudo apt-get install tk-dev
I'm trying to install Bugzilla as part of setting up Testopia. I'm using 3.6.3 because our company site uses that and there are no plans to upgrade in the foreseeable future. I've install mysql but when I run the /usr/bin/perl install-module.pl DBD::mysql script it fails. The error message though isn't very descriptive. I've included it below:
Running Mkbootstrap for DBD::mysql ()
chmod 644 mysql.bs
rm -f blib/arch/auto/DBD/mysql/mysql.so
LD_RUN_PATH="/home/y/lib/mysql:/lib64" /usr/bin/perl myld gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.so \
-L/home/y/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lssl -lcrypto \
/usr/bin/ld: skipping incompatible /home/y/lib/mysql/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
make: * [blib/arch/auto/DBD/mysql/mysql.so] Error 1
CAPTTOFU/DBD-mysql-4.021.tar.gz
/usr/bin/make -- NOT OK
Skipping test because of notest pragma
Running make install
Make had returned bad status, install seems impossible
I don't know why libmysqlclient.so is incompatible. Is the installed version of mysql too old or is it too recent for this version of Bugzilla? The error message does not specify. Can anyone help?
this looks like this which suggest you update your operating system.
hope this could help
I'm trying to install a mysql2 gem on a ruby on rails app. I'm currently running Ubuntu 11.04 and this is the error I get when I run sudo gem install mysql2 or bundle install:
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
checking for rb_thread_blocking_region()... no
checking for rb_wait_for_single_fd()... no
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
creating Makefile
make
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_MYSQL_H -DHAVE_ERRMSG_H -DHAVE_MYSQLD_ERROR_H -I/usr/include/mysql -DBIG_JOINS=1 -fno-strict-aliasing -g -fPIC -fno-strict-aliasing -g -g -O2 -fPIC -Wall -funroll-loops -c client.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_MYSQL_H -DHAVE_ERRMSG_H -DHAVE_MYSQLD_ERROR_H -I/usr/include/mysql -DBIG_JOINS=1 -fno-strict-aliasing -g -fPIC -fno-strict-aliasing -g -g -O2 -fPIC -Wall -funroll-loops -c mysql2_ext.c
./client.h:16:1: warning: ‘rb_thread_blocking_region’ defined but not used
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_MYSQL_H -DHAVE_ERRMSG_H -DHAVE_MYSQLD_ERROR_H -I/usr/include/mysql -DBIG_JOINS=1 -fno-strict-aliasing -g -fPIC -fno-strict-aliasing -g -g -O2 -fPIC -Wall -funroll-loops -c result.c
gcc -shared -o mysql2.so client.o mysql2_ext.o result.o -L. -L/usr/lib -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -Wl,-rpath,/usr/lib/x86_64-linux-gnu -lruby1.8 -L/usr/lib/x86_64-linux-gnu -lmysqlclient_r -lpthread -lz -lm -lrt -ldl -lpthread -lrt -ldl -lcrypt -lm -lc
/usr/bin/ld: cannot find -lmysqlclient_r
collect2: ld returned 1 exit status
make: *** [mysql2.so] Error 1
Gem files will remain installed in /var/lib/gems/1.8/gems/mysql2-0.3.11 for inspection.
Results logged to /var/lib/gems/1.8/gems/mysql2-0.3.11/ext/mysql2/gem_make.out
I've tried installing with mysql_config, I've installed the libmysqlclient-dev and libmysql-ruby libraries, I've tried uninstalling and reinstalling mysql. None of it works. I am able to successfully install mysql gem but not mysql2.
I'm running ruby1.8 and Rails 2.3.5. Can anyone help me out?
try this:
sudo apt-get install libmysql-ruby
sudo apt-get install libmysqlclient-dev
sudo gem install mysql2
Look at this blog and others like it. But ultimately, I recommend upgrading from 11.04 to 11.10. I experienced many strange errors when running 11.04, since moving to 11.10 everything is much more stable.
If you are running CentOS/Redhat, try install the following packages (using yum):
MySQL-devel-5.5.22-1.el6.x86_64
MySQL-shared-5.5.22-1.el6.x86_64
MySQL-shared-compat-5.5.22-2.el6.x86_64