ubuntu-12.04

ImportError: No module named datetime

安稳与你 提交于 2019-12-04 08:49:42
问题 When I upgrade my Ubuntu into 14.04 from 12.04, this time I get this error: ImportError: No module named datetime 回答1: This happened to me when I created a virtualenv and then upgraded from 12.04 to 14.04. I had to delete my virtualenv and recreate it, and after doing that, everything worked again. 回答2: Just run this command. It worked like a charm! $ cp /usr/bin/python2.7 $(which python2.7) This just happened to me after the 14.10 update, and it seems to be because my virtual environments

AzureException: Unable to access container using anonymous credentials, and no credentials found for them in the configuration

廉价感情. 提交于 2019-12-04 07:17:30
I am trying to use Hadoop of Azure HDInsight. I am logging into the cluster by ssh and running the following hadoop jar jar_name class_name wasb://container@storagename.core.windows.net/inputdir wasb://container@storagename.core.windows.net/outputdir But I get the following exception: Exception in thread "main" org.apache.hadoop.fs.azure.AzureException: org.apache.hadoop.fs.azure.AzureException: Unable to access container xxx in account yyy.core.windows.net using anonymous credentials, and no credentials found for them in the configuration. I am using azure cli and I ran "azure login" before

'sqlite3_api' was not declared in this scope

泄露秘密 提交于 2019-12-04 05:24:59
问题 I've been learning sqlite3 programming in C++ for the first time and this error confounds me and my internet searching abilities. Here is my code, as far as it gets before throwing an error. #include <iostream> #include <sqlite3ext.h> using namespace std; int main() { sqlite3 *database; int check; check = sqlite3_open("introdb3.db", &database); //error is here } I'm pretty sure that it has something to do with the libraries that are (or aren't) being linked, but I can't figure out how to make

how gcc automatically know to include glib library

萝らか妹 提交于 2019-12-04 05:19:29
问题 I make simple program in C which uses glib.h , but when I compile it I get an error like: $ gcc test.c -o test test.c:3:18: fatal error: glib.h: No such file or directory compilation terminated. So from above it seems gcc can't find glib.h file (which is a part of the libglib2.0-dev package and have already installed it). So first I try locate glib.h files in my system and found output as below: $ locate glib.h /usr/src/linux-headers-3.2.0-29-generic-pae/include/config/blk/dev/bsglib.h /usr

BIO_do_connect fails, returns negative value

江枫思渺然 提交于 2019-12-04 05:13:56
问题 I am trying and using OpenSSL in C (on ubuntu 12.04). Took an example from here. Everything goes well until BIO_do_connect() which returns a negative value. Probably I did something wrong in calling these two API because bio is passed to BIO_do_connect(). An example of the format to use in the second parameters of these two functions would be appreciated. BIO_set_conn_ip(bio, &ip); BIO_set_conn_int_port(bio, &port); It is really not comfortable that both functions return 1 always (correct,

gccgo on Precise

此生再无相见时 提交于 2019-12-04 04:38:43
When trying to link with gccgo on Precise, I get this linking error: matt@matt-1005P:~/src/gopath/src/meme$ gccgo cmd/meme/main.go -o meme /usr/bin/ld: cannot find -lgcc_s collect2: error: ld returned 1 exit status There are reports of this error, but no clean solutions. How do I fix it? gccgo (Ubuntu/Linaro 4.7.0-0ubuntu4) 4.7.0 Linux matt-1005P 3.2.0-24-generic-pae #38-Ubuntu SMP Tue May 1 16:40:26 UTC 2012 i686 i686 i386 GNU/Linux This was recently brought up on the golang-nuts group: compiling with gccgo from packaged binaries . It's a known issue in Ubuntu ( Bug #966570 ). To work around

undefined reference to `x264_encoder_open_125'

╄→гoц情女王★ 提交于 2019-12-04 03:26:28
While installing ffmpeg on Ubuntu 12.04 I am getting following error libavcodec/libavcodec.a(libx264.o): In function `X264_init': /root/ffmpeg/libavcodec/libx264.c:492: undefined reference to `x264_encoder_open_125' collect2: ld returned 1 exit status make: *** [ffmpeg_g] Error 1 I am following the instructions given at http://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide Do anyone have idea about this error? This is a typical problem for people who already have x264 installed through the package management system. You can solve this in at least 2 ways: Uninstall the already existing x264

403 Forbidden on nginx/1.4.6 (Ubuntu) - Laravel

坚强是说给别人听的谎言 提交于 2019-12-03 22:27:06
I keep getting 403 Forbidden My settings: /etc/nginx/sites-available/default default server { listen 80; root home/laravel-app/; index index.php index.html index.htm; server_name example.com; location / { try_files $uri $uri/ /index.html; } error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/www; } # pass the PHP scripts to FastCGI server listening on the php-fpm socket location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script

non www to www using AWS Elastic Load balancer and Nginx

。_饼干妹妹 提交于 2019-12-03 21:36:13
问题 I have an app running on example.com and now I wanna redirect all the traffic to the www.example.com since we are collaborating with Akamai's CDN for your website. My domain is parked in Route53, added the CNAME of Elastic Load Balancer's CNAME to pointing to *.example.com and I am running nginx web server with the following configuration. If I use this configuration ELB is throwing the instance out, now domain.com works fine and www.domain.com fine, but redirecting is not happening. server {

Authenticating google sheets on AWS Ubuntu without browser

筅森魡賤 提交于 2019-12-03 21:30:20
I'm running R Studio on an AWS "Ubuntu Server 12.04.2" and accessing R Studio via my browser. When I try to authenticate google auth API using the package googlesheets with the code: gs_auth(token = NULL, new_user = FALSE, key = getOption("googlesheets.client_id"), secret = getOption("googlesheets.client_secret"), cache = getOption("googlesheets.httr_oauth_cache"), verbose = TRUE) The problem here is that it redirects me to browser which is of local machine (windows based). Even if I authorize it, it redirects to a URL like " http://localhost:1410/?state=blahblah&code=blahblah ". How do I