I have been trying to install the Rust Diesel CLI tool using cargo install diesel_cli, but the installation fails with a linking error
ld: library not found for -lmysqlclient
clang: error: linker command failed with exit code 1
(use -v to see invocation)
I installed the MySQL client using Homebrew: brew install mysql-client. During installation I got the following warning:
mysql-client is keg-only, which means it was not symlinked into /usr/local,
because conflicts with mysql.
If you need to have mysql-client first in your PATH run:
echo 'export PATH="/usr/local/opt/mysql-client/bin:$PATH"' >> ~/.bash_profile
For compilers to find mysql-client you may need to set:
export LDFLAGS="-L/usr/local/opt/mysql-client/lib"
export CPPFLAGS="-I/usr/local/opt/mysql-client/includeā€¯
I set the PATH and flags as in that warning message, but I still get the above linking error when trying to install the diesel-cli tool. I am unfamiliar with how to do linking in Rust - are there extra steps I need to do here to link mysqlclient directly?
Cargo ignores LDFLAGS and CPPFLAGS, you should set RUSTFLAGS instead. Something like this untested invocation:
RUSTFLAGS="-L/your_lib -I/your_include" cargo install diesel_cli
Relevant documentation.
On my side, I did not make it work with a mysql-client only. I had to install mysql with
brew install mysql
In the end, what matters is that you have a version of the mysqlclient dynamic lib.
Mines where installed here :
/usr/local/lib/libmysqlclient.21.dylib
/usr/local/Cellar/mysql/8.0.15/lib/libmysqlclient.21.dylib
And it worked.
I am trying to setup PSIPRED to run a secondary structure prediction but the README.md file is not detailed enough for a beginner like me to setup and run PSIPRED. I am trying to use it with BLAST+.
I am on a Linux Ubuntu 17.04 operating system, and the following are the steps I take to try and setup PSIPRED. There seems to be missing programs that I am not sure how to install or find where they are as well as missing commands:
sudo apt install ncbi-blast+ #OK: Install BLAST+
wget http://bioinfadmin.cs.ucl.ac.uk/downloads/psipred/psipred.4.01.tar.gz #OK: Get the latest PSIPRED
tar xzvf psipred.4.01.tar.gz #OK: Extract the latest PSIPRED
rm psipred.4.01.tar.gz #OK: Remove the the latest PSIPRED .tar.gz download
cd psipred/src #OK: Go to source code directory
make #OK: Compile PSIPRED binaries
make install #OK: Compile PSIPRED binaries
cd .. #OK: Go back to PSIPRED top level directory
wget ftp://ftp.uniprot.org/pub/databases/uniprot/uniref/uniref90/uniref90.fasta.gz #OK: Download the latest uniref90 database
gunzip -v uniref90.fasta.gz #OK: Uncompress the latest uniref90 database
bin/pfilt uniref90.fasta > uniref90filt #ERROR HERE: pfilt not found. Cannot find where the pfilt program is and cannot find from where to install it from
formatdb -t uniref90filt -i uniref90filt #ERROR HERE: formatdb not found. Cannot find where the formatdb program is and cannot find from where to install it from
makeblastdb -dbtype prot -in uniref90filt -out uniref90filt #OK: Not sure what this does but it works fine
./BLAST+/runpsipredplus example/example.fasta #ERROR HERE: /usr/local/bin/psiblast: Command not found. FATAL: Error whilst running blastpgp - script terminated!
How can I get PSIPRED to work? what I am doing wrong? Where can I get all the necessary external program to make PSIPRED work? What am I missing?
I am trying to solve problem installing XMind 3.6.0 RPM on Fedora 23.
I have downloaded the .deb package from XMind webpage.
Than, I have converted it to RPM package with Alien, to be able to install it on Fedora with help of this manual.
sudo alien -r -c xmind-3.6.0-2.x86_64.deb
and than install the generated RPM package
sudo rpm -ivh xmind-3.6.0-2.x86_64.rpm
but I keep getting the error message:
Preparing... ################################# [100%]
file /usr/bin from install of xmind-3.6.0-2.x86_64 conflicts with file from package filesystem-3.2-35.fc23.x86_64
file /usr/lib from install of xmind-3.6.0-2.x86_64 conflicts with file from package filesystem-3.2-35.fc23.x86_64
Does anybody know, how to resolve this conflict?
Thanks,
shimon
I was unable to solve the error described in my post. However, I have found a way to install XMind 7 (3.6.0) on Fedora 23.
Following this page.
The problem is, the xmind binaries structure has changed since this article. So the commands needed are little bit different.
Download Xmind portable version from Xmind web page - http://www.xmind.net/xmind/downloads/xmind7-portable-3.6.0.R-201511090408.zip
Extract it to directory ~/xmind_portable, then cd ~/xmind_portable
Untar the data.tar.gz tar -xf data.tar.gz
Move desktop launcher sudo mv ./usr/share/applications/xmind.desktop /usr/share/applications
sudo mv ./usr/share/mime/packages/xmind.xml /usr/share/mime/packages/
Move application data sudo mv ./usr/lib/xmind/ /opt/
Update mime DB sudo update-mime-database /usr/share/mime/
Make a link to your bin
sudo ln -s /opt/xmind/XMind /usr/local/bin/xmind
Then use it!
xmind
When I try to install rails using gem on my Arch Linux machine, I get the following error:
$ gem install rails
...
...
make install
/usr/bin/install -c -m 0755 bcrypt_ext.so /home/gphilip/.rvm/gems/ruby-1.9.3-preview1/gems/bcrypt-ruby-3.0.1/lib
make: /usr/bin/install: Command not found
make: * [/home/gphilip/.rvm/gems/ruby-1.9.3-preview1/gems/bcrypt-ruby-3.0.1/lib/bcrypt_ext.so] Error 127
It turns out that on Arch Linux, the "install" binary is located at /bin/install. So on my system I have:
$which install
/bin/install
$
Since I have root access (it is my laptop!), I could easily "fix" this by creating a symlink at /usr/bin/install , but how would I do this otherwise?
How do I configure gem to use the "install" command from /bin/ instead of insisting on using the one in /usr/bin/ ?
I am asking this in case I am in a situation where I face the same problem and I don't have permissions to create symlinks in arbitrary places.
Find rbconfig.rb file in your ruby installation dir (example for my machine):
$ which ruby
/home/valentin/.rvm/rubies/ruby-1.8.7-p352/bin/ruby
$ find /home/valentin/.rvm/rubies/ruby-1.8.7-p352 -name rbconfig.rb
/home/valentin/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/x86_64-linux/rbconfig.rb
In that file change line
CONFIG["INSTALL"] = '/usr/bin/install -c'
to
CONFIG["INSTALL"] = '/bin/install -c'
(Or whichever is the correct install path, I've had to change it back to /usr/bin, for example)
You might want to update other paths as well.
Or, you can just reinstall ruby.
Here's the output:
Ian-MacBook-Pro:DBD-mysql-4.011 ianseyer$ sudo Perl Makefile.PL
Can't exec "mysql_config": No such file or directory at Makefile.PL line 76.
Cannot find the file 'mysql_config'! Your execution PATH doesn't seem
not contain the path to mysql_config. Resorting to guessed values!
Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
PLEASE NOTE:
For 'make test' to run properly, you must ensure that the
database user 'root' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.
mysql> grant all privileges on test.* to 'root'#'localhost' identified by 's3kr1t';
You can also optionally set the user to run 'make test' with:
perl Makefile.pl --testuser=username
Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Failed to determine directory of mysql.h. Use
perl Makefile.PL --cflags=-I
to set this directory. For details see the INSTALL.html file,
section "C Compiler flags" or type
perl Makefile.PL --help
I've researched the issue and tried making a symlink to no avail.
Do I have to compile this myself?
If you installed the mysql server that everybody installs:
sudo apt-get install mysql-server (or something like this)
you are missing a few extra files on which the makefile for this perl module depends.
You can try to work around this issue by installing the following package:
sudo apt-get install libmysqlclient-dev
REFERECE:
http://cpansearch.perl.org/src/RUDY/DBD-mysql-2.9008/INSTALL.html#configuration
Applying to ubuntu/debian users (I'm running U-12.0.4), it was suggested above that users do:
sudo apt-get install libmysqlclient-dev
But then there is another problem with the maketest portion of the install where the "password: NO" FAILED. To bypass that test, just use force:
sudo cpan -f DBD::mysql
if u r using ubuntu , u can easily install using the below cmd
sudo apt-get install libdbd-mysql-perl
for more detail check the cpan install.pod consist detail about other Linux flavor
Install the mysql-devel package that pertains to your distro and mysql server version.
You just need mysql-server and mysql-devel installed locally so that cpan can build the module, you can probably remove the mysql server afterwards.
Find the script mysql_config.pl under your MySQL directory, and run Makefile.PL like:
perl Makefile.PL --mysql_config=/path/to/mysql-5.x.y.zzz/bin/mysql_config.pl
If you try to install via CPAN you cannot, as far as I know, set the --mysql_config option directly. And, including the directory containing mysql_config in the PATH environment variable does not seem to help.
However, if you do have the file mysql_config available somewhere, you can do the following to make the install succeed:
ln -s /path/to/mysql_config /usr/local/bin/
Then, remove the symbolic link after the DBD::mysql installation.
The tests during install will still fail, unless you have installed MySQL in some central/default location on your system, but installation will still succeed.
If you do not have mysql_config available, you can get it from a tar.gz download of the MySQL Community Server from mysql.com. It will be located in the bin/ subdirectory of the extracted files. If you want to have MySQL installed on your system, a better option is probably to download the RPMs and install them, or install via the package management system of your OS.
Try yum install mariadb-devel for CentOS 7 and then
run the required Perl module installation such as cpan DBD::mysql
I was getting make test errors. This helped me;
perl Makefile.PL --testuser=bob --testpass=bobtest
I solved installing libmariadbclient-dev, libmariadb-dev and mariadb-client on debian 9.13
apt install mariadb-client libmariadbclient-dev libmariadb-dev