cpp: error trying to exec 'cc1': execvp: No such file or directory - cc

i face with following error when i build roms model by ./build.bash command. appeared error is
cpp: error trying to exec 'cc1': execvp: No such file or directory
i use yum install gcc-c++ but it replied that package gcc-c++-4.6.3-2fc16.i686 already installed . but i get nothing after typing whereis cc1.then i find cc1 in /usr/libexec/gcc/i686-redhat-linux/4.6.3. therefore i navigate to /usr/bin and create link by ln -s cc cc1. after that by typing whereis cc1 it replied:/usr/bin/cc1
again by typing ./build.bash it reply:
cc1:error:unrecognized command line option '-quiet'
would you please tell me how i can sort out this problem.
cheers
fereshte

Related

Using Node to Run Compound repo

I'm following the instructions found here:
https://github.com/compound-finance/compound-protocol
I've ran:
git clone https://github.com/compound-finance/compound-protocol
cd compound-protocol
yarn install --lock-file
yarn test
yarn run v1.22.11
$ ./script/test
Unknown option: p
Unknown option: p
Type shasum -h for help
Type shasum -h for help
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Why do I keep getting this error with unknown option p
Try to use Node.js version 12. NVM is a great tool to quickly switch between versions of Node on the command line. https://nvm.sh

How to resolve FATAL ERROR: Could not find /usr/bin/mysql mariadb on Arch/Manjaro Linux?

I am accidentally delete /usr/bin/mysql from my directory. It make an error when I run mysql_secure_installation and produce following error message.
FATAL ERROR: Could not find /usr/bin/mysql
If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.
If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location
I have already tried to uninstall mariadb using sudo pacman -Rns mariadb and installing it again, but /usr/bin/mysql not generate. Are someone already face same problem before ?

fatal error: 'mysql/mysql.h' file not found

I have installed mysql using
brew install mysql
Then compiled using
gcc -I/usr/include mydb.c
However it gives me the error:
fatal error: 'mysql/mysql.h' file not found
What am I doing wrong here? Am on macosx 10.12
edit: tried gcc -I/usr/local/include/mysql/ mydb.c still broken
On ubuntu16.04,mysql.h locates in /usr/include/mysql.
You can find it after install libmysqlclient20 or libmysqlclient-dev.
Verify at where are install mysql, for this, using the command for see the file list of directory
ls
and using
cd
The installation, in my example, are is in directory:
/usr/local/mysql-<version_my_mysql>/include/
second step is indicate the directory everytime compiller:
gcc my_program_code_file.c -I /usr/local/mysql-5.7.9-osx10.9-x86_64/include/ -o my_program_executable
the includers in code are:
#include <mysql.h>

How can i install Percona's pt-archiver for XAMPP?

I need to archive my MySQL-database every year and I found the Percona Toolkit. But I want to try it on XAMPP first and not on the actual server. I used the Shell from the XAMPP Control Panel.
First, I installed pt-archiver with the command:
wget percona.com/get/pt-archiver --no-check-certificate
The installation was successful. I tried my first dry run:
pt-archiver --source h=127.0.0.1,D=db_ilb,t=erstbegegnung --file 'C:\xampp\Archive\%Y-%m-%d-%D.%t' --where "1=1" --limit 1000 --commit-each --dry-run
and it threw an error:
install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted.
Compilation failed in require at (eval 14) line 3.
at ./pt-archiver line 2499.
After trying to install DBD::mysql via CSPAN, another error was thrown:
Warning: No success on command[C:\xampp\perl\bin\perl.exe Makefile.PL]
CPAN: YAML::XS loaded ok (v0.39)
MICHIELB/DBD-mysql-4.041.tar.gz
C:\xampp\perl\bin\perl.exe Makefile.PL -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
Stopping: 'install' failed for 'DBD::mysql'.
Could not read metadata file. Falling back to other methods to determine prerequisites
I don't know what to do next... If you have any other suggestions for archiving, let me know :)

Trying to install Perl-Mysql DBD, mysql_config can't be found

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