debian

When I try the command rails server on a new project I get this error

只愿长相守 提交于 2020-01-17 03:38:08
问题 I am running Debian 7. I am using RVM. I am also running mySQL. I am new to ruby in general as well as rails. Please excuse any of me if I seem naive at all. I setup a project with: rails new projectname -d mysql Then I went into that directory and ran: rails server I then get this error: /home/user/.rvm/gems/ruby-2.0.0-p247/gems/execjs-2.0.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available

Runtime.exec() from tomcat6 succeeds, but cannot access any files

女生的网名这么多〃 提交于 2020-01-17 03:04:28
问题 I'm moving our servlets (pure Java, running in Tomcat 6) from CentOS to Debian, and faced the problem with executing commands with Runtime.exec() . (The command should be ImageMagick's convert in production, but I have simplified the calls to find the source of problems, so all the following code with echo is tested and not working as well). String command = "echo test123 > /tmp/tomcat6-tmp/1"; Runtime runtime = Runtime.getRuntime(); Process process = runtime.exec(command); int exitVal =

unable to update python package psutil

僤鯓⒐⒋嵵緔 提交于 2020-01-17 01:37:25
问题 when i check the version of psutil in python it says i have version 0.5.0 : $ uname -a Linux mypc 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 GNU/Linux $ python Python 2.7.3 (default, Mar 13 2014, 11:03:55) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import psutil >>> psutil.__version__ '0.5.0' >>> psutil.virtual_memory() Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no

ubuntu 登录不上/ 环境变量失效 The command could not be located because '/usr/bin:/bin' is not included in the PATH environment variable.

∥☆過路亽.° 提交于 2020-01-16 11:12:50
机器上编译了5.0/6.0的源码,安装的jdk1.7 ,然后由于需要编译4.2.2,所以又安装了jdk1.6 ,配置了环境变量 gedit /etc/environment 改成如下 PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" PATH="$PATH:/usr/lib/jvm/jdk1.6.0_43/bin:/usr/lib/jvm/jdk1.6.0_43" JAVAHOME="/usr/lib/jvm/jdk1.6.0_43" CLASSPATH="$JAVAHOME/lib:$JAVAHOME/jre/lib" JRE_HOME=$JAVA_HOME/jre 编译源码成功后,第二天重启,发现图形登录界面密码正确登录不上,循环跳回登录界面. Ctrl+ Alt+ F1 进入tty1 ,输入用户名和密码,但是基本命令都用不了,如reboot/ls/rm/nano/vi都不行,提示 The command could not be located because '/usr/bin:/bin' is not included in the PATH environment variable. 后来在网上搜索到 http://blog

“Cannot assign requested address” error when running dotnet console application on Linux

ⅰ亾dé卋堺 提交于 2020-01-16 08:40:57
问题 The error: Unhandled exception. System.Net.Sockets.SocketException (99): Cannot assign requested address I am trying to run a small Dotnet Console Application that talks using sockets in Debian. The machine that it runs on is a VM on Google Cloud's Platform. It runs well when running in Visual Studio on the Windows Machine. On the Linux, it doesn't run both when trying to run from the source code, and after publishing... I checked-ish the ports, I allowed using UFW the ports that are used, as

imagettftext not working

假如想象 提交于 2020-01-16 03:51:13
问题 I've tried to write text in an image just for testing purposes because my Zabbix install is not writing text in the graphs. I've copied the code bellow from the php.net website (http://php.net/manual/en/function.imagettftext.php) <?php // Set the content-type header('Content-Type: image/png'); // Create the image $im = imagecreatetruecolor(400, 30); // Create some colors $white = imagecolorallocate($im, 255, 255, 255); $grey = imagecolorallocate($im, 128, 128, 128); $black =

Automate Bluetooth Pairing/Trusting in Bluez5

痴心易碎 提交于 2020-01-16 03:29:04
问题 I've been working on making my RPi 2 function like a car bluetooth receiver and all is well, except I have no idea how I could automate the pairing of bluetooth devices in Bluez5. In the past I would've used the bluetooth agent and a simple script, but that seems to have gone out the window with the move from 4 -> 5. The nature of the setup means I have no kb/mouse on the RPi once its in the car, so it needs to be a fully automated setup where anyone can scan for the RPi, and if the probably

QSerialPort cannot open tty after application has previously been run by `root` [duplicate]

僤鯓⒐⒋嵵緔 提交于 2020-01-16 01:42:49
问题 This question already has answers here : QSerialPort is causing a program stop (endless loop?) if opening device (2 answers) Closed 3 years ago . I have an application (using QSerialPort ) that reads and writes from a serial port. When I run this application as the root user, then run it again as a non-root user, I am no longer able to write to the serial port, receiving the following error: QIODevice::write (QSerialPort): device not open The non-root user is in the dialout group, and the

Ubuntu/Debian 安装lxml的正确方式

夙愿已清 提交于 2020-01-16 01:21:20
lxml是Python的一个库,主要用于处理XML和HTML。 最近需要用lxml,但是在Ubuntu上直接pip安装失败,研究了半天终于找到了正确安装方法,记录在此。 由于Ubuntu和Debian安装软件方法一样,所以两个系统都适用。 $sudo apt-get install libxml2-dev libxslt-dev python2.7-dev $sudo pip install lxml 你可以把2.7换成你的Python版本。 这个会安装最新版,还有一种方法比较简单,但是安装的可能是比较旧的版本,列出来供大家参考: $sudo apt-get install python-lxml 来源: https://www.cnblogs.com/numbbbbb/p/3434519.html

Doctrine2 with Symfony2 not recognizing db charset and collation

浪子不回头ぞ 提交于 2020-01-15 14:13:57
问题 I am trying to get Doctrine2 to work properly with a mysql db in Symfony2 on a debian squeeze system. The charset and collation of the DB are set to utf8 and utf8_general_ci and the db is created manually by reading in an sql script. Now I enter some values for one of the tables with danish special chars like æøå and they simply wont display correctly. My parameters.yml has set encoding: utf8 and in my config.yml the doctrine configuration has: doctrine: dbal: driver: %database_driver% host: