Nupic Installation Ubuntu 13.04 - ubuntu-13.04

I am having a heck of a time installing NUPIC on ubuntu-13.04-desktop-amd64.iso [within Exsi 5.1].
I've followed the instructions on https://github.com/numenta/nupic/wiki/Install-Nupic-on-ubuntu-13.04. The install fails at:
pip install -r external/common/requirements.txt
with the following error:
error: could not create '/usr/local/lib/python2.7/dist-packages/asteval': Permission denied
It works if I use sudo pip install... but just fails on
$NUPIC/build.sh
I also had to add
sudo apt-get install python-dev
sudo apt-get install python-numpy
to even get it to the "pip install..." point.
Any assistance would be appreciated.
Thanks,
Neil

I had the same problem trying to install nupic.
I was following these instructions:
https://github.com/numenta/nupic/wiki/Running-Nupic-in-a-Virtual-Machine
The problem you may be facing is that your user does not have read/write access to the /usr/local/lib/python2.7/dist-packages/asteval folder. You can use the chown command to change that folders ownership to the user you want and give that user read/write access.
With regards to the above instructions, I installed using sudo but failed to realize that the environment variables for root were different than the environment variables for the user I created to install nupic.
Hope this helps,
VS

Thank you for the report. I've created a ticket to address this installation issue.
Neilg, please try these instructions: https://github.com/numenta/nupic/wiki/Installing-NuPIC-on-Ubuntu

The problem you may be facing is that your user does not have read/write access to the /usr/local/lib/python2.7/dist-packages/asteval folder. You can use the chown command to change that folders ownership to the user you want and give that user read/write access.
YOU NEED TO ADD THE OPTION --user after pressed commands

Related

Cloud Functions Emulator: Unable to deploy functions

I am trying to deploy my functions on the cloud functions emulator but my terminal throws me this error:
$ functions deploy sendNotifications --trigger-http
{ Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/#google-cloud/functions-emulator/logs'
at Error (native)
at Object.fs.mkdirSync (fs.js:922:18)
at Object.assertLogsPath (/usr/local/lib/node_modules/#google-cloud/functions-emulator/src/emulator/logs.js:31:10)
at new Controller (/usr/local/lib/node_modules/#google-cloud/functions-emulator/src/cli/controller.js:84:32)
at Object.exports.handler (/usr/local/lib/node_modules/#google-cloud/functions-emulator/src/cli/commands/deploy.js:124:22)
at Object.self.runCommand (/usr/local/lib/node_modules/#google-cloud/functions-emulator/node_modules/yargs/lib/command.js:231:22)
at Object.Yargs.self._parseArgs (/usr/local/lib/node_modules/#google-cloud/functions-emulator/node_modules/yargs/yargs.js:989:30)
at Object.Yargs.self.parse (/usr/local/lib/node_modules/#google-cloud/functions-emulator/node_modules/yargs/yargs.js:533:23)
at Object.main (/usr/local/lib/node_modules/#google-cloud/functions-emulator/src/cli/main.js:69:6)
at getProjectId.then (/usr/local/lib/node_modules/#google-cloud/functions-emulator/bin/functions:100:27)
errno: -13, code: 'EACCES', syscall: 'mkdir', path:
'/usr/local/lib/node_modules/#google-cloud/functions-emulator/logs' }
I have cd-ed to the functions directory and checked that I am logged in to firebase and selected the right project Id. Am i doing something wrongly?
Overview
The proper way to fix this is by changing the npm global directory to one that does not require root permission to install and run.
You really should not be requiring sudo to npm install -g.
Likewise to functions start.
Cleansing
Given that you have installed functions, presumably using sudo npm install -g #google-cloud/functions-emulator, you now need to first uninstall it equally with sudo: sudo npm uninstall -g #google-cloud/functions-emulator.
Why uninstall it? You currently have functions installed into a directory where root permissions are required to write. It does require write permission to log file as you can see from the error.
I would suggest uninstalling the other npm packages which you may have installed using sudo, except npm. You can find out what you have using sudo npm list -g --depth=0.
Changing npm global directory
I would suggest going with Option 2 described on https://docs.npmjs.com/getting-started/fixing-npm-permissions
Copy pasting solution from link above:
Make a directory for global installations:
mkdir ~/.npm-global
Configure npm to use the new directory path:
npm config set prefix '~/.npm-global'
Open or create a ~/.profile file and add this line:
export PATH=~/.npm-global/bin:$PATH
Back on the command line, update your system variables:
source ~/.profile
Install global without sudo
Now that your machine has been cleansed and npm global has been configured to a directory that does not require root permissions, you should be able to install and run without sudo.
Had the same issue. For me it did not showed the permission log also..The issues is with the permissions. Try to the command with super user.
Step 1.
Start the gcloud functions
sudo functions start
Step 2.
Deploy the helloworld function which was exported.
sudo functions deploy helloworld --trigger-http
This is obviously very late for the original post. Hope this helps other who has the same error in the future.
I had the same issue turn out I hadn't installed that the requirements properly. Any one who steps in here can look at Error: EACCES: permission denied #195.
Main note of this error install all requirements properly.

ubuntu 14.04 no /etc/mysql folder after installing

I am trying to install mysql and later phpmyadmin on a ubuntu 14.04 server after initial install.
So far I have configured Apache.
there is no mysql folder inside /etc/
I used the command
sudo apt-get install mysql-server to install mysql
When I do this I have no prompt for a password and the mysql folder is still not created inside /etc/ but it says it installed anyway.
First of all, I'd advice you to follow this link:
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu
Second, as mentioned in the link, sometimes (though in my case it took care of itself), you may need to activate MySQL installation using sudo mysql_install_db
I found this
https://askubuntu.com/questions/392438/mysql-job-failed-to-start
After following the un-install commands and insatllign mysql-server I was prompted for the password.

Run PhpStorm's Create Project with sudo

I want to create a new node.js app in PhpStorm but it can't build it as npm requires root to install. I can't seem to find a way to make PhpStorm run npm as su.
Is there a way to do so?
Installing with sudo will likely result in more issues. I'd rather suggest making sure that your user (the one you run WebStorm with) has the right privileges in ~/.npm, and give it the needed permissions ( 'sudo chown -R $USER ~/.npm' )

Error running mysql_install_db: could not find ./bin/my_print_defaults

I seem to be having an issue getting MySQL 5.6.1.5 to install from Source. I am running RHEL 6.
I was able to perform the cmake, make, and make install without issues.
I am attempting to run the mysql_install_db binary and when I do I get the following error:
Fatal ERROR: Could not find ./bin/my_print_defaults
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 bat at the top level of the
extracted archive, or pass the --basedir option pointing to that location.
So I did a check for my_print_defaults using which my_print_defaults, unfortunately it was not found on my machine.
I did a locate my_print_defaults as well just for the heck of it and said it was located in /usr/bin/my_print_defaults, however, when I checked /usr/bin for the binary, it was not actually there.
I would try to use mysql_install_db --basedir=/usr/bin but I know this won't work as the which and locate commands confirm my_print_defaults isn't on my machine.
I looked at mysql_install_db giving error, but that error was not similar to this one.
Please ignore question, I didn't bother to try running find / -name my_print_defaults and found it in /usr/local/mysql/bin/
I searched packages for my_print_defaults with
apt-file search my_print_defaults
If my_print_defaults is missing on your system (which my_print_defaults), first find out which db is installed with:
dpkg -l |grep -E 'maria|mysql'|grep ii|grep server
If you have installed mariadb, try reinstall mariadb:
sudo apt install --reinstall mariadb-server-core-10.1
If you don't find a solution with mariadb, swap back to mysql with
sudo apt install mysql-server

brew link mysql did not complete

For some some reason brew does not link mysql and it complains about permission.
I chmod the folder to 777 but I am still having the same issues
laptop$ brew install mysql
Error:
mysql-5.5.27 already installed, it's just not linked
laptop$ brew link mysql
Linking /usr/local/Cellar/mysql/5.5.27... Warning: Could not link mysql.
Unlinking...
Error:
Could not symlink file: /usr/local/Cellar/mysql/5.5.27/lib/plugin
/usr/local/lib is not writable. You should change its permissions.
I figured what the problem was.
It was issues with premission and I basically did this
sudo chown -R $(whoami) /usr/local/lib/
I believe You should:
sudo chmod 775 /usr/local/lib/
and make sure You are member of the file's group.
Not really an answer, but a comment that may help those who are pulling out hair chowning and chmoding like crazy and still getting "not writeable" errors at linking. For example, from $ brew doctor -d
Error: /usr/local/lib/pkgconfig isn't writable.
This can happen if you "sudo make install" software that isn't managed by
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.
I suggest you check the linked file and it's dependencies and either delete them and reinstall via homebrew, or install the package without using homebrew.
In my system this worked perfectly.
chown -R $(whoami) /usr/local/share/
I am trying to give a general answer to the question.
It happens that neither /usr/local/lib/ nor /usr/local/share/ gives error. You should look the exact directory that is not writable. It is mentioned right after "Error: Could not symlink". So execute the command for that directory.
chown -R $(whoami) [/bath/to/your/dir]