ubuntu-12.04

Why doesn't nokogiri install?

不想你离开。 提交于 2019-12-06 11:58:34
I'm having a devil of a time installing Nokogiri on Ubuntu 12.04. I use rbenv. $ gem install nokogiri -v '1.6.1' ERROR: While executing gem ... (Errno::EACCES) Permission denied - /home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.1/.autotest $ sudo gem install nokogiri -v '1.6.1' ERROR: Error installing nokogiri: nokogiri requires Ruby version >= 1.9.2. $ rbenv sudo gem install nokogiri -v '1.6.1' Building native extensions. This could take a while... ERROR: Error installing nokogiri: ERROR: Failed to build gem native extension. /home/deploy/.rbenv/versions/2.0.0

Can't get elasticsearch to run as a service on Ubuntu 12.0.4 (Natty) - ElasticSearch may have failed to start

六月ゝ 毕业季﹏ 提交于 2019-12-06 10:38:06
问题 I've read three of the solutions provided here and here and here. Followed those three however it doesn't work. Whenever I tried running elasticsearch as a service: /etc/init.d/elasticsearch start it always gives me: Waiting for ElasticSearch................................ WARNING: ElasticSearch may have failed to start. Now when I try to find the error log (/var/log/elasticsearch), it's never there. ANy idea? 回答1: Make sure that you have the JDK and you have specified the JAVA_HOME and the

Characters encoding wrong in terminal using git

风流意气都作罢 提交于 2019-12-06 10:00:56
Any time I try to make a "git diff" command to see a file change, it shows me problem in special characters, like accented ones, but if I see the file with "cat" it shows me everything ok. I am using Ubuntu 12.04 LTS. ex: WHERE `T<C3><A9>cnico` IS NOT NULL I tried to put these lines in .gitconfig, close terminal e open again, but still didn't work. [i18n] logoutputencoding = utf8 commitencoding = utf8 Anyone have other suggestion? VonC Make sure of your git version. For Ubuntu12.0.4 (precise), the package search for git indicates a: git-core (1:1.7.9.5-1) And i18n issues have been addressed in

Trying to delete all but most recent 2 files in sub directories

为君一笑 提交于 2019-12-06 08:57:11
问题 I'm creating a cron that cleans subdirectories (first child only) of a specified folder of all but the most recent two files but running into issues. These are my attempts: find ./ -type d -exec rm -f $(ls -1t ./ | tail -n +4); find . -maxdepth 2 -type f -printf '%T@ %p\0' | sort -r -z -n | awk 'BEGIN { RS="\0"; ORS="\0"; FS="" } NR > 5 { sub("^[0-9]*(.[0-9]*)? ", ""); print }' | xargs -0 rm -f I also tried to create an array of files with the intention of going through the total minus 2, but

What is the proper permission configuration of sendmail

青春壹個敷衍的年華 提交于 2019-12-06 08:34:45
This question comes from a problem much similar to this https://serverfault.com/questions/320607/ubuntu-jaunty-sendmail-php-mail-premission-errors But those answers don't solve my problem I have a php application which is using PHPMailer to send emails. I installed sendmail on my ubuntu 12.04 LTS with sudo apt-get install sendmail sudo sendmailconfig But the application failed to send any mail. In the mail.err it says: Apr 14 00:31:42 AY sendmail[32241]: NOQUEUE: SYSERR(www-data): can not chdir(/var/spool/mqueue-client/): Permission denied while www-data is the username of apache2. Then I

Numpy loadtxt encoding

瘦欲@ 提交于 2019-12-06 08:26:16
I am trying to load data with numpy.loadtxt... The file im trying to read is using cp1252 coding. Is there a possibility to change the encoding to cp1252 with numpy? The following import numpy as np n = 10 myfile = '/path/to/myfile' mydata = np.loadtxt(myfile, skiprows = n) gives: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 189: invalid start byte The file contains metadata (first n rows) followed by a table of floats. Edit: This problem only occurs when running this on Ubuntu (12.04). On Windows it works well. For this reason I think this problem is related to the

Ubuntu encrypted home directory | Errno 36 File Name too long

自古美人都是妖i 提交于 2019-12-06 06:10:17
Working on a python scraper/spider and encountered a URL that exceeds the char limit with the titled IOError. Using httplib2 and when I attempt to retrieve the URL I receive a file name too long error. I prefer to have all of my projects within the home directory since I am using Dropbox. Anyway around this issue or should I just setup my working directory outside of home? The fact that the filename that's too long starts with '.cache/www.example.com' explains the problem. httplib2 optionally caches requests that you make. You've enabled caching, and you've given it .cache as the cache

Compiling issues with boost

前提是你 提交于 2019-12-06 05:55:40
I'm having problems with compiling a program which includes "boost/asio.hpp". Compiling this program(taken from boost site): example.cpp: #include <boost/lambda/lambda.hpp> #include <iostream> #include <iterator> #include <algorithm> int main() { using namespace boost::lambda; typedef std::istream_iterator<int> in; std::for_each( in(std::cin), in(), std::cout << (_1 * 3) << " " ); } with c++ -I path/to/boost_1_55_0 example.cpp -o example works fine. But when the program includes: boost/asio.hpp And I'm trying to compile it with: g++ -I /usr/local/boost_1_55_0 example.cpp -o example -lboost

C: Undefined reference to floor

给你一囗甜甜゛ 提交于 2019-12-06 05:48:38
问题 I am using Eclipse on Ubuntu to write/compile/run C code. I am trying to build my project. Following is the output in the Eclipse console. 22:18:31 **** Build of configuration Debug for project Project1 **** make all Building file: ../project1.c Invoking: GCC C Compiler gcc -I/lib/i386-linux-gnu -O0 -g3 -Wall -c -fmessage-length=0 -pthread -lm -MMD -MP -MF"project1.d" -MT"project1.d" -o "project1.o" "../project1.c" ../project1.c: In function ‘main’: ../project1.c:146:6: warning: unused

cuda with optimus just to access gpgpu

旧城冷巷雨未停 提交于 2019-12-06 04:10:35
问题 I have a Dell XPS L502 with the Nvidia 525M graphics card. I am only interested in using the gpgpu capabilities of the card for now. I installed Ubuntu 12.04 as a dual boot with the Windows 7 that came with the machine and followed several installation procedures for installing the CUDA driver and developer kit from Nvidia ( many re-installs of Ubuntu ). In all cases the display drops to 640x480 resolution. Best I can determine this has something to do with Optimus technology and Linux. I