I'm starting a project where im going to use AngularJS, NodeJS and MySQL. This is my first real web application, and it's also the first time im using npm.
I've installed Node from their official website, and when i write npm install the node_modules comes to the project directory.
The problem occurs if I try to use any of the installed npm_modules. I tried to download mysql, and the installation worked, but when i type mysql -p i get: "bash: mysql: command not found"
I've also tried to install it with npm install mysql -g, but it still doesn't work.
If it means anything my $PATH is /usr/local/git/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/local/bin
The mysql npm package contains just the nodejs client library for mysql. You need to install the mysql server separately using the appropriate method for your OS.
it looks like you have not installed mysql on your system.
install mysql server using the following command
sudo apt-get install mysql-server
Related
Recently I updated my MacOS to Monterey 12.3 which included updates for xcode.
After that I am not able to run the rails application that I have been working on. I keep getting this error when I try to spin up the server.
I have tried installing and removing mysql different ways. Both using a brew install and DMG file from mysql website.
I am able to access the database instance through my command line but I think they issue is that it I can't connect from application. Anyone else having similar issues?
here is the full error
/Users/gus/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:324:in `require': dlopen(/Users/gus/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle, 0x0009): Library not loaded: libssl.1.1.dylib (LoadError)
Referenced from: /Users/gus/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle
Reason: tried: 'libssl.1.1.dylib' (no such file), '/usr/local/lib/libssl.1.1.dylib' (no such file), '/usr/lib/libssl.1.1.dylib' (no such file), '/Users/gus/gus_project/Gus2021/libssl.1.1.dylib' (no such file), '/usr/local/lib/libssl.1.1.dylib' (no such file), '/usr/lib/libssl.1.1.dylib' (no such file) - /Users/gus/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle
If anyone runs into this problem, this is what solved my issue.
paths to openssl needed to be updated.
gem install mysql2 -- --with-ldflags=-L/opt/homebrew/opt/openssl#1.1/lib --with-cppflags=-I/opt/homebrew/opt/openssl#1.1/include
bundle install
Obviously this is for openssl install with brew install version 1.1
I was able to get it working with this:
brew install openssl
bundle config build.mysql2 --
--with-ldflags=-L/opt/homebrew/opt/openssl#1.1/lib
--with-cppflags=-I/opt/homebrew/opt/openssl#1.1/include
brew install openssl#1.1
Do all the export path things, and make sure to link openssl#1.1
brew link openssl#1.1 --force
I had similar issue with postgresql, which raises error while running psql -d database:
Library not loaded: '/opt/homebrew/opt/openssl#1.1/lib/libssl.1.1.dylib'
In my case which I have openssl#3 and openssl# the solution is:
brew install openssl#1.1
brew link openssl#1.1 --force
Then reinstall postgresql with homebrew.
I also had my zshrc exporting the following ENV variable though I'm not quite sure if it's related:
export PATH="/opt/homebrew/opt/openssl#1.1/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/openssl#1.1/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl#1.1/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl#1.1/lib/pkgconfig"
For someone who runs into the same issue as mine!
I am using CakePHP 3 and MAMP Pro server for my project. When I am trying to bake the cake, this error shows up:
Fatal error: You must enable the intl extension to use CakePHP.
I have even included intl.so and extension=php_intl.dll in my php.ini file but couldn't figure out solution for this error.
this issue was happening to me some days ago. I had installed Ubuntu 18.04 and php 7.1.
I was trying to run the comman php cake.php bake in orden to use cakephp's console but I was getting the following error message:
You must enable the intl extension to use CakePHP.
This extension (intl) was installed for php 7.1 (php7.1-intl) but this message was appearing every time I used php cake.php bake
After some google searches, I saw that I have to install the extension but with the following command:
sudo apt-get install php-intl
The same issue happened with mbstring extension, I used the command:
sudo apt-get install php-mbstring
then I restarted the apache server with:
sudo service apache2 restart
It's difficult to pinpoint exactly what's wrong without seeing your system setup. However based on what was said in the question, you may be setting up the intl extension incorrectly.
First off, if your OS is Linux/macOS and the PHP extension is a shared library (i.e. has a .so extension) then the php.ini entry should be extension=intl.so not extension=php_intl.dll. Also make sure the intl.so file is in the directory configured under the ini entry extension_dir. Otherwise make sure the extension ini entry is fully qualified (e.g. extension=/path/to/extension/dir/intl.so).
If you are using a Linux OS that has a package manager such as Debian/Ubuntu, you may be able to more easily install the extension for the PHP packaged for that distro. For example, in Ubuntu/Debian the package php5-intl provides the intl extension for PHP5 (I assume it's something similar for PHP7 if you've enabled those repos).
If you build PHP from source, you can try bundling the extension into your PHP. See the instructions from the manual.
I faced the same issue.
I added extension="php_intl.dll" in php.ini and restarted the Apache server.
Now it is working.
I had the same issue. After starting from scratch, I did :
$ brew install php
$ composer install && composer update && composer dump-autoload --optimize
$ composer self-update && composer create-project --prefer-dist cakephp/app:^3.8 cms
$ cd cms
$ bin/cake server
And it was working !
So i've been creating a desktop application using electron. The problem is that when I run my application using npm it doesn't show any error about a missing module but when i package it and run it this error shows
I'm sure that i've install mysql module using npm install -g mysql and npm install mysql in the project directory. It's all working fine when i run the unpacked version of the application
Assuming that you have installed mysql if not please install mysql npm install mysql --save-dev
Hi I also ran in same error I tried everything possible but nothing seems to work , after several hit and trial I was able to fix it and in the end realize that it was all happening because of
When I installed MySQL module I never saved it (--save-dev)
And electron-packager was not able to locate it when I pack it because was not mention in package.json
A solution might locate mysql folder in node_module folder and delete
then install it npm install mysql --save-dev
or manually
add it under dependencies in package.json file
I'm trying to get Sphinx (and thinking Sphinx working). It have worked before - but it stopped working tonight after my colleague installed Node, php and some other stuff.
It first complained about a locked pid file:
FATAL: failed to lock pid file
After this I tried to reinstall Sphinx:
brew uninstall sphinx
And:
brew install sphinx.
I already have mysql so I skipped --mysql. This results in the following:
This is not sphinx - the Python Documentation Generator.
To install sphinx-python: use pip or easy_install,
Sphinx has been compiled with libstemmer support.
Sphinx depends on either MySQL or PostreSQL as a datasource.
You can install these with Homebrew with:
brew install mysql
For MySQL server.
brew install mysql-connector-c
For MySQL client libraries only.
brew install postgresql
For PostgreSQL server.
We don't install these for you when you install this formula, as
we don't know which datasource you intend to use.
When running searchd I get this:
FATAL: no readable config file (looked in /usr/local/Cellar/sphinx/2.2.6/etc/sphinx.conf, ./sphinx.conf).
And when trying to start thinking-sphinx for my rails app I get:
Failed to start searchd. Check the log files for more information.
And the log file still says:
FATAL: failed to lock pid file
I'm not sure what is causing this, or how I can fix it. Thought that reinstalling Sphinx would be enough - but I'm stuck at square one.
Any ideas on how I can get it to work again?
How about uninstalling sphinx and giving this a go:
brew install sphinx --pgsql --mysql
I am trying to install a software which required MySQL-server, MySQL-client installed on the server so now I want to install MySQL-server and MySQL-client using rpm files "MySQL-server-5.5.17-1.rhel5.x86_64.rpm" and "MySQL-client-5.5.17-1.rhel5.x86_64.rpm".
I have installed MySQL-client but when I try to run mysql-server
*rpm -i MySQL-server-5.5.17-1.rhel5.x86_64.rpm*
it's showing error:
*error: Failed dependencies:
MySQL conflict with mysql-5.0.77-4.el5_6.6.x86_64
MySQL conflict with mysql-5.0.77-4.el5_6.6.i386
MySQL conflict with mysql-server-5.0.77-4.el5_6.6.x86_64*
So how can i solve this problem?
the error given by you *error: Failed dependencies:
MySQL conflict with mysql-5.0.77-4.el5_6.6.x86_64
MySQL conflict with mysql-5.0.77-4.el5_6.6.i386
MySQL conflict with mysql-server-5.0.77-4.el5_6.6.x86_64*
It clear show that the machine you are going to install mysql 5.5 rpm have mysql 5.0.77 installed .
to resolve this problem .
1. you take backup of datadir and my.cnf (if you are using mysql 5.0 db server earlier).
2. remove all mysql 5.0 server packages , to remove these package you should knew what are the packages already installed on machine
to view all mysql package already installed use rpm -qa | grep -i "mysql*" this command show what package is already installed on machine
now you have to remove all package which name shows in above command.
to remove a package/rpm use rpm -e mysql-5.0.** if show error then use
rpm -e --nodeps mysql-5.0.**
we have to remove all packages one by one by using rpm -e .
after successful remove all older version of mysql , now start installation of mysql-5.5*** packages by using rpm -ivh mysql-5.5***.rpm.
First question - is the version of MySQL already installed actually in use or was it simply there as a result of a fresh CentOS install? If the former, try upgrading rather than installing. If the latter, uninstall the old version (possibly using the --no-deps option on rpm) and then install the newer version
Next, are you trying to replace MySQL or install another version alongside it?
If the former, again try upgrading rather than installing. If that's not possible, you're going to have to remove the older version and then install the new version
If the latter, and if it is possible, look at the --prefix and --relocate options in RPM.as they may help.
If you do to mange to get it installed side by side with an older, you'll have fun and games ensuring that the relevant versions are pointing to the correct libraries and that you don't get any corruption between them. Also, you will need to run them so that they listen on separate ports with separate database folders, PID and socket files etc.
Whatever you need to do, do it out of business hours with as many backups as you can do