debian

Using imshow in opencv without running X

左心房为你撑大大i 提交于 2019-12-11 00:59:44
问题 I've got an application with a Raspberry Pi running Debian that is pretty performance demanding and I am trying to avoid starting X when booting and jumping directly into the program. This works fine, but if I would like to use the 'imshow' function in OpenCV, it does not work correctly, instead it says 'GTK-Warning: cannot open display" and exits the program. Is it feasible to display a fullscreen image/video capture with opencv using imshow or any other function without X, or is it entirely

Building a preconfigured debian package

ε祈祈猫儿з 提交于 2019-12-11 00:35:45
问题 I am trying to build a debian package which automatically configures all my machines to use the same configuration files and settings. For example I am trying to set things like alter /etc/default/hostapd. I am currently doing this by using dh_install to copy a file to /etc/default/hostapd with the configuration I want it to have. This results in the error: trying to overwrite '/etc/default/hostapd', which is also in package hostapd What is the correct way to create a debian package which

Start X server on Google Cloud (Debian) Compute Engine

孤街浪徒 提交于 2019-12-10 23:41:30
问题 I have set up a Debian(jessie) VM on Google cloud. I have installed Xfce with needed dependencies. Now I am trying to start the X display server with command 'startx' But I get following error -------- Using system config directory "/usr/share/X11/xorg.conf.d" (EE) Fatal server error: (EE) no screens found(EE) -------- Following messages are present in /var/log/Xorg.0.log ---------------------------------- many lines before this [ 3535.932] (WW) Falling back to old probe method for

Packages have unmet dependencies when installing mono-devel in Kali (Debian)

泄露秘密 提交于 2019-12-10 23:05:35
问题 I tried to install mono-devel and typed sudo apt-get mono-devel in the terminal. But failed and got the following results: ~# apt-get install mono-devel Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following

sudo gem install rails- this doesn't give me a rails command for bash

試著忘記壹切 提交于 2019-12-10 21:09:58
问题 I'm on Ubuntu. I type in sudo gem install rails . This works fine, installs railes and 7 other gems fine. Yet $ rails blog is saying this: The program 'rails' is currently not installed. You can install it by typing: sudo apt-get install rails 回答1: how did you install rubygems, as an admin, or as a user? if you installed it as a user, it may not have the bin directory in your path. If I were you, (assuming you installed rubygems into your home folder), I would trash that installation dir (not

How provide nested mount of overlayfs

北慕城南 提交于 2019-12-10 20:49:44
问题 I try mount layer of overlayfs as lower layer next overlayfs, but after two layer it's crash mount -t overlayfs -o rw,lowerdir=/tmp/test/layers/centos5.6-layer0-lower,upperdir=/tmp/test/layers/centos5.6-layer0-upper overlayfs /tmp/mount/centos5.6-layer0-mount # remove deleted files into overlayfs find /tmp/mount/centos5.6-layer0-mount -lname '(overlay-whiteout)' -exec rm -rf {} \; mount -t overlayfs -o rw,lowerdir=/tmp/mount/centos5.6-layer0-mount,upperdir=/tmp/test/layers/centos5.6-layer1

How do I build a debian package whose sources include symbolic links outside of the source tree?

时间秒杀一切 提交于 2019-12-10 20:23:17
问题 I have a project whose source includes symbolic links to other source trees (notably, the CppUTest framework). I need to build a debian package out of my project, but dpkg-source will not follow the symbolic links. Digging further, I believe this is because the default behavior for tar is not to dereference symbolic links unless explicitly told to (with -h ). I was unable to find a way to pass this extra option to tar when building the debian source tarball. So what am I doing wrong here? Is

Database Function giving an error - Postgresql

牧云@^-^@ 提交于 2019-12-10 20:17:18
问题 I had some help on here and got the following code: -- Setup Solrid Function CREATE OR REPLACE FUNCTION solrid(IN local_id INTEGER, OUT result TEXT) AS $$ DECLARE database_id TEXT := 'A'; BEGIN result := database_id || local_id::TEXT; END; $$ LANGUAGE PLPGSQL; However when I run it in sqlfiddle it says: Schema Creation Failed: ERROR: unterminated dollar-quoted string at or near "$$ DECLARE database_id TEXT := 'A'": This error may seem pretty self explanatory but I can't figure out the way to

Scrapy run from Python

一世执手 提交于 2019-12-10 20:12:37
问题 I am trying to run Scrapy from Python. I'm looking at this code which (source): from twisted.internet import reactor from scrapy.crawler import Crawler from scrapy.settings import Settings from scrapy import log from testspiders.spiders.followall import FollowAllSpider spider = FollowAllSpider(domain='scrapinghub.com') crawler = Crawler(Settings()) crawler.configure() crawler.crawl(spider) crawler.start() log.start() reactor.run() # the script will block here My issue is that I'm confused on

configparser not working in Python 3.4, NoSectionError but works fine in PyCharm

寵の児 提交于 2019-12-10 20:02:04
问题 I worked on a Python 3.4 script in PyCharm 4.5. (repo: https://github.com/Djidiouf/bbot ) In it, I used import configparser without any problem for retrieving some values in a config.cfg: config = configparser.RawConfigParser() config.read('config.cfg') server = config.get('bot_configuration', 'server') channel = config.get('bot_configuration', 'channel') botnick = config.get('bot_configuration', 'botnick') port = config.getint('bot_configuration', 'port') Now, I want to deploy it on a Debian