기본 콘텐츠로 건너뛰기

error lsb_release

Step 1 : Learning that the package for lsb_release is lsb-release
root@vm1:/usr/bin# apt-get autoremove lsb_release
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package lsb_release
root@vm1:/usr/bin# apt-get install lsb_release
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package lsb_release

Step 2 : removing and installing lsb_release
root@vm1:/usr/bin# apt-get autoremove lsb-release
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
lsb-release python-central
0 upgraded, 0 newly installed, 2 to remove and 27 not upgraded.
After this operation, 487 kB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 99295 files and directories currently installed.)
Removing lsb-release ...
Removing python-central ...
Processing triggers for man-db ...
root@vm1:/usr/bin# apt-get install lsb-release
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
python-central
Suggested packages:
lsb
The following NEW packages will be installed:
lsb-release python-central
0 upgraded, 2 newly installed, 0 to remove and 27 not upgraded.
Need to get 0 B/52.2 kB of archives.
After this operation, 487 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Selecting previously deselected package python-central.
(Reading database ... 99260 files and directories currently installed.)
Unpacking python-central (from .../python-central_0.6.15ubuntu5_all.deb) ...
Selecting previously deselected package lsb-release.
Unpacking lsb-release (from .../lsb-release_4.0-0ubuntu11_all.deb) ...
Processing triggers for man-db ...
Setting up python-central (0.6.15ubuntu5) ...
Setting up lsb-release (4.0-0ubuntu11) ...
Processing triggers for python-central ...

Step 3 : Learning that it still doesn't work
root@vm1:/usr/bin# /usr/bin/lsb_release
Traceback (most recent call last):
File "/usr/bin/lsb_release", line 26, in
import lsb_release
ImportError: No module named lsb_release

Step 4 : attempting to install with fake lsb_release
root@vm1:/usr/bin# apt-get install ia32-libs
Reading package lists... Done
Building dependency tree
Reading state information... Done
(snip)
Setting up lib32ncursesw5 (5.7+20101128-1) ...
Setting up ia32-libs (20090808ubuntu13) ...
No LSB modules are available.
[: 11: Distributor: unexpected operator
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

Hard coded lsb_release :
root@vm1:/usr/bin# cat /usr/bin/lsb_release.new
#!/usr/bin/python

# lsb_release command for Debian
# (C) 2005-08 Chris Lawrence

# This package is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 dated June, 1991.

# This package is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this package; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.

from optparse import OptionParser
import sys
import commands
import os
import re

# import lsb_release

def main():
parser = OptionParser()
parser.add_option('-v', '--version', dest='version', action='store_true',
default=False,
help="show LSB modules this system supports")
parser.add_option('-i', '--id', dest='id', action='store_true',
default=False,
help="show distributor ID")
parser.add_option('-d', '--description', dest='description',
default=False, action='store_true',
help="show description of this distribution")
parser.add_option('-r', '--release', dest='release',
default=False, action='store_true',
help="show release number of this distribution")
parser.add_option('-c', '--codename', dest='codename',
default=False, action='store_true',
help="show code name of this distribution")
parser.add_option('-a', '--all', dest='all',
default=False, action='store_true',
help="show all of the above information")
parser.add_option('-s', '--short', dest='short',
action='store_true', default=False,
help="show requested information in short format")

(options, args) = parser.parse_args()
if args:
parser.error("No arguments are permitted")

short = (options.short)
none = not (options.all or options.version or options.id or
options.description or options.codename or options.release)

print >> sys.stderr, "No LSB modules are available."

if options.id or options.all:
print 'Distributor ID: Ubuntu'

if options.description or options.all:
print 'Description: Ubuntu 11.04'

if options.release or options.all:
print 'Release: 11.04'

if options.codename or options.all:
print 'Codename: natty'

if __name__ == '__main__':
main()

댓글

이 블로그의 인기 게시물

톰캣 세션 타임 아웃 설정

web.xml 파일이 있습니다. 이 파일을 열어서 session이라고 검색해 보십시오. <session-config>   <session-timeout>360</session-timeout> </session-config> 위 단락을 찾을 수 있습니다. session-timeout 시간 360이 바로 자동로그아웃 세션 시간입니다.  단위는 분이고요. 30분으로 하고 싶으시면 30으로 바꿔서 저장해주시면 되는 것이죠~ Tomcat 내에서 Session Timeout 를 설정하는 우선 순위가 존재 한다. session.setMaxInactiveInterval() 프로그램내에서 time out 를 설정했을 경우 Web application 내의 WEB-INF/web.xml Tomcat 내의 conf/web.xml 실제로 Tomcat(conf/web.xml)내에 Default 로 설정되어 있는 것은 다음과 같다. < HttpSession 메서드 > getCreationTime() - 세션 생성 시간 getLastAccessedTime() - 마지막 요청 시간 setMaxInactiveInterval() - 최대허용시간 설정 (초) getMaxInactiveInterval() - 최대허용시간 invalidate() - 세션 제거 < 타임아웃 설정하기 > - 일정 시간 동안 요청이 없으면 세션을 제거한다  1. DD에서 전체 세션 타임아웃 설정       web.xml 1. DD에서 전체 세션 타임아웃 설정       web.xml <web-app ... >     <servlet>          ...     </servlet>     <session-config>         <session-timeout>30</session-timeout>

dmesg 메시지 실시간으로 보기

참조사이트 http://imitator.kr/Linux/556 # tail -f /var/log/messages # tail -f |dmesg //기본 2초 단위로 갱신 된다. # watch "dmesg | tail -f" //1초 단위로 갱신하면서 보여준다. # watch -n 1 "dmesg | tail -f" // 보여주는 줄을 20으로 늘린다. (기본 10줄) # watch -n 1 "dmesg | tail -f -n 20"

kernel Hello World

리눅스 커널 모듈 프로그래밍 가이드 참조:http://www.tldp.org/LDP/lkmpg/2.6/html/lkmpg.html 커널 모듈 가이드 아래 테스트는 우분투 14.04에서 테스트 되었습니다. 모듈 유틸리티 insmod:모듈을 커널에 적재한다. rmmod:커널에서 모듈을 제거한다. lsmod:커널에서 적재된 모듈 목록을 보여준다. depmod: 모듈간 의존성 정보를 생성한다. modprobe:모듈을 커널에 적재하거나 제거한다. modinfo rdma_ucm 모듈 정보 보기: #lsmod #cat /etc/modprobe.conf #modinfo ib_core 커널에서 제공하는 심볼 테이블 :커널 내부의 함수나 변수 중 외부에서 참조할 수 있는 함수의 심볼과 주소를 담은 테이블 #cat /proc/kallsyms 커널 모듈 제작해 보기 kernel ver 3.16 hello.c /*  *  hello.c - The simplest kernel module.  */ # #include <linux/module.h> #include <linux/kernel.h> int init_module(void) { printk("<1>Hello World 1.\n"); return 0; } void cleanup_module(void) { printk(KERN_ALERT "Goodbye world 1.\n"); } Makefile obj-m += hello.o all:         make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules clean:         make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean #make make -C /lib/modules/3