ubuntu-10.04

How to compile the multithread code with gcc

冷暖自知 提交于 2019-12-09 03:23:21
问题 I have seen the given two makefiles as follows: all: thread1 thread2 thread3 CFLAGS=-I/usr/include/nptl -D_REENTRANT LDFLAGS=-L/usr/lib/nptl -lpthread clean: rm -f thread1 thread2 thread3 ###################### all: thread1 thread2 thread3 CFLAGS=-D_REENTRANT LDFLAGS=-lpthread clean: rm -f thread1 thread2 thread3 Without using makefile, what is the correct command line to compile the thread1.c with gcc? gcc -o thread1 CFLAGS=-I/usr/include/nptl -D_REENTRANT LDFLAGS=-L/usr/lib/nptl -lpthread

Why javaw is not found on my java installation on ubuntu? [closed]

岁酱吖の 提交于 2019-12-09 02:27:49
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I tried to start a program using javaw demo and I was prompted with an error message saying that command 'javaw' is not found. I checked my bin folder and javaw was not found. What could be the reason? 回答1: The javaw utility is not available or needed on Linux. Just use java instead. Explanation: on Windows, the

How to open a serial port with pyserial?

故事扮演 提交于 2019-12-08 04:12:58
问题 I am trying to open a serial port with python. This is on Ubuntu. I import the openinterface.py and enter in this ser = openinterface.CreateBot(com_port = "/dev/ttyUSB1", mode="full") I get an error saying "unsupported operand types for -: 'str' and 'int'" I tried the same call with single quotes instead of double, and with no quotes at all. How can I fix this? Or is there an alternative function to use? I only know the basics of Python so maybe its some small syntax thing I am not noticing?

error while building android 4.3 master

試著忘記壹切 提交于 2019-12-08 00:28:01
问题 i need to build android 4.3 master. following instruction from here http://source.android.com/source/building.html . It's going well up to sync-ing source code from repo. When we are trying to build using "make -j4", this is occurring. 1 error make: *** [out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes-full-debug.jar] Error 41 make: *** Waiting for unfinished jobs.... Here is full log - ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION

Rails - capistrano and chmod

十年热恋 提交于 2019-12-07 16:03:53
问题 I want to use chmod via capistrano to add permission for folder. For example, i want to do that: chmod 777 -R /vol/www/apps/ror_tutorial/current/log/ So, i want to do that via capistrano's task. I tried that: desc "Fix permission" task :fix_permissions, :roles => [ :app, :db, :web ] do run "#{try_sudo} chmod 777 -R #{current_path}/log" end after "deploy:update_code", :fix_permissions But it doesn't work. Permissions of the folder are same: $ ls -alh /vol/www/apps/ror_tutorial/current/log/

whenever PATH in crontab file for rails 3 ubuntu

半腔热情 提交于 2019-12-07 14:10:24
问题 I am using whenever gem with rails 3. On my production server (ubuntu) , the runner task does not run. I tried setting the :set job_template to get -l -i as mentioned in this github ticket. However that does not solve the problem. The problem on this particular production ubuntu is that the ruby path is not there in echo $PATH : echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games Whereas the ruby path is /var/rails/myapp/shared/bundle/ruby/1.8/bin So if I

How to generate uuid with PostgreSQL 8.4.4 on Ubuntu 10.04?

好久不见. 提交于 2019-12-07 06:43:07
问题 I am running PostgreSQL 8.4.4 with Ubuntu 10.04. I am trying to generate uuid but can't find a way to do it. I do have the uuid-ossp.sql in /usr/share/postgresql/8.4/contrib/uuid-ossp.sql When I try this is what I get : postgres=# SELECT uuid_generate_v1(); ERROR: function uuid_generate_v1() does not exist LINE 1: SELECT uuid_generate_v1(); ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. Any idea ? 回答1: The stuff in contrib aren't run

Accessing the X Display for Ubuntu GDM login screen [closed]

孤者浪人 提交于 2019-12-07 04:46:46
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . Overall I am trying to inject key presses into the Ubuntu login screen from a separate shell. I have the machine (running Ubuntu 10.04) at the standard login screen and I am SSH'd into the machine as well. I've tried the following (from the SSH shell): $ ps ax | grep X 2844 tty8 Ss+ 0:01 /usr/bin/X :0 -br

ERROR: Could not find 'wxe_driver.so'

…衆ロ難τιáo~ 提交于 2019-12-06 04:32:34
问题 I got this error on my ubuntu when I run debugger:start(). Erlang R14B02 (erts-5.8.3) [source] [smp:4:4] [rq:4] [async-threads:0] [kernel-poll:false] Eshell V5.8.3 (abort with ^G) 1> debugger:start(). =ERROR REPORT==== 14-Feb-2012::17:57:27 === ERROR: Could not find 'wxe_driver.so' in: /usr/local/lib/erlang/lib/wx-0.98.9/priv {ok,<0.36.0>} I want to know how to fix the error in order to use debugger ? 回答1: Are you running the default erlang running on ubuntu? Unfortunately there is no longer

installing RSRuby in Ubuntu 10.04

流过昼夜 提交于 2019-12-06 02:19:30
I'm trying to install RSRuby on Ubuntu 10.04. I barely even know what error messages to report as the relevant ones; I've just been googling around for several hours and none of the commands I try solve the problem. Here are a few sample error messages: $ sudo gem install rsruby -- --with-R-dir=/usr/lib/R Building native extensions. This could take a while... ERROR: Error installing rsruby: ERROR: Failed to build gem native extension. /usr/bin/ruby1.8 extconf.rb --with-R-dir=/usr/lib/R checking for main() in -lR... yes checking for R.h... no ERROR: Cannot find the R header, aborting. Gem files