debian

How to install Haskell Platform on Linux Debian Wheezy?

半世苍凉 提交于 2019-12-30 08:16:19
问题 Initially I thought I would get install Haskell with couple of commands using apt-get but its seems somehow complex. As I look at the haskell org download page, I downloaded haskell-platform-2013.2.0.0.tar.gz . Then next step is somehow confusing. It ask to install GHC before installing platform but at the same time if one opens GHC download page , it shows some warning e.g Stop ! ..... we recommend installing the Haskell Platform instead of GHC . Please guide me how to install Haskell on

Check if a Debian package is installed from Python

喜欢而已 提交于 2019-12-30 03:50:08
问题 Is there an elegant and more Python-like way to check if a package is installed on Debian? In a bash script, I'd do: dpkg -s packagename | grep Status Suggestions to do the same in a Python script? 回答1: This is a pythonic way: import apt cache = apt.Cache() if cache['package-name'].is_installed: print "YES it's installed" else: print "NO it's NOT installed" 回答2: If you are checking for the existence of a package that installs a Python module, you can test for this from within a dependent

How to override dpkg-buildflags CFLAGS?

♀尐吖头ヾ 提交于 2019-12-30 03:18:09
问题 I got a package with: $ apt-get source <pkg-name> and now I am trying to build it with: $ dpkg-buildpackage -uc -us -j8 At the beginning of the output, there is stated: dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor): -D_FORTIFY_SOURCE=2 dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor): -g -O2

dpkg : how to ignore error in post/pre scripts

时间秒杀一切 提交于 2019-12-30 00:21:20
问题 I've develop debian packages and have syntax mistake in my post/pre script (postrm in my case). I install package successfully, but now i can't remove this package : /var/lib/dpkg/info/blablabla.postrm: 11: Syntax error: ";;" unexpected dpkg: error processing blablabla (--remove): subprocess installed post-removal script returned error exit status 2 How can ignore it and completely remove package? 回答1: Well, personally I have no idea about this either. If --force-all doesn't work, I would

How to test a weekly cron job? [closed]

≯℡__Kan透↙ 提交于 2019-12-29 10:05:20
问题 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 last year . I have a #!/bin/bash file in cron.week directory. Is there a way to test if it works? Can't wait 1 week I am on Debian 6 with root 回答1: Just do what cron does, run the following as root : run-parts -v /etc/cron.weekly ... or the next one if you receive the "Not a directory: -v" error: run-parts /etc/cron.weekly -v

How to bind Tkinter destroy() to a key in Debian?

你说的曾经没有我的故事 提交于 2019-12-29 10:03:35
问题 The following code works correctly in MS Windows (the script exits when pressing q ): import Tkinter as tk class App(): def __init__(self): self.root = tk.Tk() self.root.geometry("{0}x{1}+0+0".format( self.root.winfo_screenwidth(), self.root.winfo_screenheight()) ) self.root.overrideredirect(True) tk.Label(text="some text here").grid() self.root.bind('q', self.appexit) self.root.mainloop() def appexit(self, event): self.root.destroy() App() I tried to run it in a "window manager-less" Debian

How to install oracle-java8-installer on docker debian:jessie

偶尔善良 提交于 2019-12-29 06:44:09
问题 I am trying to install java 8 through oracle-java8-installer on a debian:jessie docker container. The following is my Dockerfile: FROM debian:jessie ENV JAVA_VERSION 1.8.0 RUN echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" > /etc/apt/sources.list.d/webupd8team-java.list RUN echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" >> /etc/apt/sources.list.d/webupd8team-java.list RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys

Where can I find and install the dependencies for pygame?

拜拜、爱过 提交于 2019-12-29 06:38:27
问题 I am relatively new to linux and am trying to install the pygame dev environment for python. When I run the setup.py it says that I need to install the following dependencies, one of which I found and installed (SDL). However, the others have been more elusive. Hunting dependencies... sh: smpeg-config: command not found WARNING: "smpeg-config" failed! SDL : found 1.2.14 FONT : not found IMAGE : not found MIXER : not found SMPEG : not found PNG : not found JPEG : not found SCRAP : found

Where can I find and install the dependencies for pygame?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-29 06:38:20
问题 I am relatively new to linux and am trying to install the pygame dev environment for python. When I run the setup.py it says that I need to install the following dependencies, one of which I found and installed (SDL). However, the others have been more elusive. Hunting dependencies... sh: smpeg-config: command not found WARNING: "smpeg-config" failed! SDL : found 1.2.14 FONT : not found IMAGE : not found MIXER : not found SMPEG : not found PNG : not found JPEG : not found SCRAP : found

Jenkins: console output characters

血红的双手。 提交于 2019-12-29 05:47:36
问题 Does anyone know how to beat such chars in Jenkins console output log? Seems there is a problem with UTF-8. 回答1: The issue here is that the characters are not being output as UTF-8 to your console. I think the solution is to tell jenkins when you invoke it to write output as UTF-8. See this solution for a similar problem UTF-8 char encoding does not work on console (Linux) Something like java -Dfile.encoding=UTF-8 jenkins.war might do the trick 回答2: In Jenkins ver. 2.46.2, I just got this to