calzoneman / sync

Node.JS Server and JavaScript/HTML Client for synchronizing online media
Other
1.47k stars 232 forks source link

Number of Errors #102

Closed nixonthekat closed 11 years ago

nixonthekat commented 11 years ago

Great Script. I'm testing it on windows atm and using the version of node.js that you listed as your current version you were using., I cd'd to my directory where the server is located, and as I run server.js it tells me I am missing

So, I tried - npm install mysql-libmysqlclient it starts to download and gives me the following error

When installing the mysql-libmysqlclient package manually I get this..

I also tried some later versions of node.js and received the same error. Was this built to be run on linux or is this a general error? Would be great for some help -Nixon

calzoneman commented 11 years ago

You have to have the MySQL client libraries installed on your computer. On Linux this is typically done by installing a package like 'mysql-client' or 'libmysqlclient'. I don't know what the windows equivalent is off the top of my head but I can look into it.

nixonthekat commented 11 years ago

Oh strange, but yeah that'd be awesome if you could. I've been looking around myself and can't seem to find anything about it. I will try this on ubuntu later tho.

ghost commented 11 years ago

Just set up a VM.

calzoneman commented 11 years ago

Have you tried installing this? http://dev.mysql.com/downloads/connector/c/#downloads

nixonthekat commented 11 years ago

Yeah I installed it earlier today, I just attempted this on linux on a VM, it has a problem with bcrypt for some reason but everything is setup right, maybe if you add my skype nixonsexman you could give me a hand on team viewer if you're available?

nixonthekat commented 11 years ago

*

calzoneman commented 11 years ago

Have you tried installing bcrypt separately instead of batched with the rest of them?

npm install bcrypt

nixonthekat commented 11 years ago

Yep, This error was returned. I did as it said. Same Result I have no idea what's causing this http://i.snapthat.net/5CAk.png

calzoneman commented 11 years ago

Oh you're still using Windows? Your previous comment implied you were having this issue on Linux.

In any case, the big red error message at the top indicates that npm needs to have Visual C++ installed (this makes sense, because it actually has to compile the bcrypt source). According to their README, OpenSSL is also a dependency: https://github.com/ncb000gt/node.bcrypt.js

If you have further questions/issues with bcrypt, I'd take it up with the developers of the node binding of it (listed above), they'll be able to help you better.

coconono commented 11 years ago

also, have a care what version of node.js you're installing.

git pull https://github.com/joyent/node pulls the 11.0 alpha build that does not play well with libmysqlclient

check your git sofware documentation on how to pull a specific branch. You want the 10.0 version then in your sync dir rename the node_modules to something else and do: npm install this will get all the dependencies sorted out.

nixonthekat commented 11 years ago

I tired both of your options, I have 10.0 installed for 64 bit, it installed it in c:\Program Files\nodejs. When I renamed the folder I did npm install it listed all the downloads, it was going normal: http://i.snapthat.net/DRc6.png and then error's went crazy, it ended up starting to download more http://i.snapthat.net/n834.png and leading to more errors. I'm not sure what's causing this tbh, i'll try linux again. However when I install these packages without setting my cd to cytube it works fine and downloads everything without issue. But with cding to cytube I receive errors.

I imported the successful downloaded dependencies to my cytube and when running node server.js this is my following error: http://i.snapthat.net/80df.png

coconono commented 11 years ago

do you have UAC turned off? UAC on will muck with folder permissions.

But yes, switch to linux. I've got my mine running on CentOS and without too much trouble. I'm compiling my setup notes into documentation, so if you need anything, let me know.

calzoneman commented 11 years ago

@nixonthekat The ENOENT and ENOTEMPTY errors are a npm issue, probably because the installation was half-finished. Try deleting the node_modules folder and installing each of the dependencies one at a time.

I'm not sure about the last error, it could again be a problem of mysql-libmysqlclient not being fully installed, but I really don't know.

What I do know is that I had no issues installing it on Debian, CentOS, and Arch. I may try figuring out how to install it on Windows.

nixonthekat commented 11 years ago

I think UAC is turned off @coconono , Yeah it is.

I have no idea either I was getting errors on ubuntu as well (but that's because apt-get install got the latest version of nodejs and I was getting errors. I'll retry tonight and let you know if I got it. Thanks for the support so for tho. both of you.

Attiasthehun commented 11 years ago

Had a try at this on Ubuntu, and sure enough same errors accured.

calzoneman commented 11 years ago

Which version of node is in their repositories? On Debian and CentOS I downloaded and compiled the source.

I've tested this with node 0.8.23, 0.9.4, 0.10.x on Debian 6, Debian 7, CentOS 6, and Arch (all built from source) and had no issues.

Which errors? Is it libmysqlclient again?

EDIT: Downloading Ubuntu 13.04 and I'll try it in a virtual machine.

calzoneman commented 11 years ago

Fresh install of Ubuntu 13.04, installed "nodejs" package from apt-get and it's v0.6. Here's how to get a newer version:

sudo apt-get install build-essential
wget http://nodejs.org/dist/v0.10.5/node-v0.10.5.tar.gz
tar xf node-v0.10.5.tar.gz
cd node-v0.10.5
./configure
make (may take a while, pass the -j# flag where # is the number of cores to compile with)
sudo make install
node -v
(Should print 0.10.5)
calzoneman commented 11 years ago

Full steps to installing CyTube on Ubuntu:

sudo apt-get install build-essential git libmysqlclient-dev
wget http://nodejs.org/dist/v0.10.5/node-v0.10.5.tar.gz
tar xf node-v0.10.5.tar.gz
cd node-v0.10.5
./configure
make (may take a while, pass the -j# flag where # is the number of cores to compile with)
sudo make install
node -v
(Should print 0.10.5)
cd -
git clone https://github.com/calzoneman/sync
cd sync
npm install
calzoneman commented 11 years ago

Which port are you attempting to use? Ports below 1000 can only be bound by a superuser, and EADDRINUSE means something else is already listening on the port you chose.

Please note CyTube has a built in webserver (express), so it's not necessary to serve the client from Apache or another webserver.

Attiasthehun commented 11 years ago

Yep i just noticed so the errors are gone now looks like the server is running. Superb everything is working now calzoneman i can confirm this will work on Ubuntu.

nixonthekat commented 11 years ago

Thanks Calzoneman, That solved all my issues.