ubuntu-12.04

error: could not create '/usr/local/lib/python2.7/dist-packages/virtualenv_support': Permission denied

别来无恙 提交于 2019-11-28 17:24:11
I am using ubuntu 12.04 and I am trying to pip install virtualenv but suddenly I got this error. samuel@sampc:~$ pip install virtualenv Downloading/unpacking virtualenv Running setup.py egg_info for package virtualenv warning: no previously-included files matching '*' found under directory 'docs/_templates' warning: no previously-included files matching '*' found under directory 'docs/_build' Installing collected packages: virtualenv Running setup.py install for virtualenv error: could not create '/usr/local/lib/python2.7/dist-packages/virtualenv_support': Permission denied Complete output

Working With Hadoop: localhost: Error: JAVA_HOME is not set

十年热恋 提交于 2019-11-28 17:16:07
I'm working with Ubuntu 12.04 LTS. I'm going through the hadoop quickstart manual to make a pseudo-distributed operation. It seems simple and straightforward (easy!). However, when I try to run start-all.sh I get: localhost: Error: JAVA_HOME is not set. I've read all the other advice on stackoverflow for this issue and have done the following to ensure JAVA_HOME is set: In /etc/hadoop/conf/hadoop-env.sh I have set JAVA_HOME=/usr/lib/jvm/java-6-oracle export JAVA_HOME In /etc/bash.bashrc I have set JAVA_HOME=/usr/lib/jvm/java-6-oracle export JAVA_HOME PATH=$PATH:$JAVA_HOME/bin export PATH which

mysql.h file can't be found

て烟熏妆下的殇ゞ 提交于 2019-11-28 16:42:36
i'm trying to install connection between c++ and mysql in ubuntu 12.04. i've installed mysql-client, mysql-server, libmysqlclient15-dev, libmysql++-dev. but when i try to compile the code i got the error: mysql.h there is no such file . i looked in the folders, there is mysql.h file, i can't understand why it can't find it. here is my code: /* Simple C program that connects to MySQL Database server*/ #include <mysql.h> #include <stdio.h> main() { MYSQL *conn; MYSQL_RES *res; MYSQL_ROW row; char *server = "localhost"; char *user = "root"; //set the password for mysql server here char *password

nginx not listening to port 80

Deadly 提交于 2019-11-28 16:23:44
问题 I've just installed a Ubuntu 12.04 server and nginx 1.2.7, removed default from sites-enabled and added my own file into sites-available and symlink at sites-enabled . Then restarted nginx. Problem: However going to the URL does not load the site. netstat -nlp | grep nginx and netstat -nlp | grep 80 both returns no results! lsof -i :80 also returns nothing. A dig from another server returns the correct ip address so it shouldn't be a DNS problem. I was able to connect to apache which I have

nginx + uwsgi: — unavailable modifier requested: 0 --

早过忘川 提交于 2019-11-28 16:23:19
问题 Ubuntu 12.04, nginx 1.2.0, uwsgi 1.0.3. I start uwsgi with the following command: uwsgi -s 127.0.0.1:9010 -M -t 30 -A 4 -p 4 -d /var/log/uwsgi.log On each request nginx replies with 502 and uwsgi writes to log the following line: -- unavailable modifier requested: 0 -- 回答1: Original answer For Python 2 on Ubuntu 11.10, using upstart , install the python plugin for uWSGI with apt-get install uwsgi-plugin-python and if you're using an ini file to configure your uWSGI app, then add plugins =

python error: no module named pylab

淺唱寂寞╮ 提交于 2019-11-28 16:02:29
I am new to Python and want to use its plot functionality to create graphs. I am using ubuntu 12.04. I followed the Python installation steps from http://eli.thegreenplace.net/2011/10/10/installing-python-2-7-on-ubuntu/ but when I do from pylab import * I am getting this error >>> from pylab import * Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named pylab My Python version is python 2.7 . Can anybody tell me what I am missing here? You'll need to install numpy, scipy and matplotlib to get pylab. In ubuntu you can install them with this command:

error while running “source .vimrc”

喜夏-厌秋 提交于 2019-11-28 14:23:59
i am having a simple vimrc file when i run "source .vimrc" in ubuntu I am getting the following error. $ source .vimrc bash: .vimrc: line 3: syntax error near unexpected token `"syntax"' bash: .vimrc: line 3: `if has("syntax")' Here is my script file set term=builtin_ansi set nu if has("syntax") syntax on endif I do have syntax installed in my vim. vim --version | grep syntax vim: /home/shankaran/src/ns/service/build/dp/lib/libcrypto.so.1.0.0: no version information available (required by /usr/lib/libpython2.7.so.1.0) vim: /home/shankaran/src/ns/service/build/dp/lib/libssl.so.1.0.0: no version

Which Ruby version am I really running?

浪尽此生 提交于 2019-11-28 10:41:51
I'm running Ubuntu 12.04 lts, and installed Ruby via RVM. The problem is, when I type ruby -v into the terminal, it says that my Ruby version is 1.8.7, and using the shotgun gem for Sinatra it says that I'm running Ruby 1.8.7. When I type rvm list it shows that the only version of Ruby that I have installed is 2.0.0 and it is my current and default version. I installed Ruby 2.0.0 via RVM and it is the only version I had installed on my machine. I tried to install Rails 4 but got an error saying that I need Ruby 1.9 or higher. How do I know what version am I really on, and how do I set 2.0.0 as

can't installing lxml on Ubuntu 12.04

醉酒当歌 提交于 2019-11-28 10:11:50
I've been trying to install lxml using pip install lxml and I get the error below. I've used apt-get install python-dev libxml2 libxml2-dev libxslt-dev before (suggested in other answers) but I still get the same error. I did not use control-c. pip install lxml Downloading/unpacking lxml Downloading lxml-3.2.4.tar.gz (3.3MB): 3.3MB downloaded Running setup.py egg_info for package lxml /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) Building lxml version 3.2.4. Building without Cython. Using build configuration of libxslt 1.1

Failed to build gem native extension (mkmf (LoadError)) - Ubuntu 12.04 [duplicate]

拟墨画扇 提交于 2019-11-28 08:38:57
问题 This question already has answers here : Unable to install gem - Failed to build gem native extension - cannot load such file — mkmf (LoadError) (9 answers) Closed 6 years ago . Hey I'm trying to install rails on a new ubuntu machine. I have ruby and rvm installed but I'm getting a "failed to build gem native extension" error. What does this mean? $ sudo gem install rails -v 3.2.9 (without the sudo says I don't have permissions) Then it outputs a lot of 'fetching' commands and ultimately this