so 로딩 에러

unix and linux 2007. 12. 31. 10:04

 

* error while loading shared libraries: libkrb5.so.3: cannot open shared object file: No such file or directory *

 

 

이런 에러가 나올 때는 다음과 같이 처리한다.

 

/etc/ld.so.conf 파일에 libkrb5.so.3이 존재하는 라이브러리 경로를 추가한다.

 

 

Include /usr/local/lib

/usr/local/xxx/lib/   (libkrb5.so.3이 들어가 있는 경로)

 

그다움.

ldconfig 명령 실행하기

 

* NAME
/sbin/ldconfig - configure dynamic linker run time bindings

* SYNOPSIS
/sbin/ldconfig [ -nNvXV ] [ -f conf ] [ -C cache ] [ -r root ] directory ...
/sbin/ldconfig -l [ -v ] library ...

/sbin/ldconfig -p

* DESCRIPTION
ldconfig creates the necessary links and cache to the most recent shared libraries found in the directories specified on the command line, in the file /etc/ld.so.conf, and in the trusted directories (/lib and /usr/lib). The cache is used by the run-time linker, ld.so or ld-linux.so. ldconfig checks the header and file names of the libraries it encounters when determining which versions should have their links updated.
ldconfig will attempt to deduce the type of ELF libs (ie. libc5 or libc6/glibc) based on what C libs, if any, the library was linked against. Therefore, when making dynamic libraries, it is wise to explicitly link against libc (use -lc).

Some existing libs do not contain enough information to allow the deduction of their type. Therefore, the /etc/ld.so.conf file format allows the specification of an expected type. This is only used for those ELF libs which we can not work out. The format is "dirname=TYPE", where TYPE can be libc4, libc5, or libc6. (This syntax also works on the command line.) Spaces are not allowed. Also see the -p option. ldconfig should normally be run by the superuser as it may require write permission on some root owned directories and files.

* OPTIONS
-v
Verbose mode. Print current version number, the name of each directory as it is scanned, and any links that are created. Overrides quiet mode.
-n
Only process directories specified on the command line. Don't process the trusted directories (/lib and /usr/lib) nor those specified in /etc/ld.so.conf. Implies -N.
-N
Don't rebuild the cache. Unless -X is also specified, links are still updated.
-X
Don't update links. Unless -N is also specified, the cache is still rebuilt.
-f conf
Use conf instead of /etc/ld.so.conf.
-C cache
Use cache instead of /etc/ld.so.cache.
-r root
Change to and use root as the root directory.
-l
Library mode. Manually link individual libraries. Intended for use by experts only.
-p
Print the lists of directories and candidate libraries stored in the current cache.

'unix and linux' 카테고리의 다른 글

모든 파일 안의 문자열 치환하기  (0) 2007.12.31
특수 파일 삭제하기  (0) 2007.12.31
vi 팁  (0) 2007.12.31
grep 사용  (0) 2007.12.30
shell 상에서 사용하는 옵션 지정하기-shopt  (0) 2007.12.29
Posted by '김용환'
,

safe_mysqld -Sg &

또는

safe_mysqld --skip-grant &

(skip grant table)

 

'DB' 카테고리의 다른 글

RAC 구축  (0) 2008.03.06
오라클 테이블 내용 복구하기  (0) 2008.02.18
mysql  (0) 2007.11.09
mysql 로그가 차면??  (0) 2007.10.20
mysql에서 버젼보기  (0) 2007.10.19
Posted by '김용환'
,

vi 팁

unix and linux 2007. 12. 31. 09:51

set ts 8

=> tab 간격을 8로 조정

 

set ai

=> auto indentation

 

set noai

=> no auto indentation

 

set wrap

=> 자동 줄바꿈 함

 

set nowrap

=> 자동 줄바꿈 하지 않음

 

set fileformat=unix

=> 줄끝에 ^M이 안붙는 것

 

set fileformat=dow

=> 줄끝에 ^M이 붙음

 

참조자료

http://www.windist.pe.kr/wiki/moin.cgi/VI

 

 

아래내용은 정리필요.

VI키.

  • 이동은 h ,j ,k ,l
  • 에디트모드에서 한글자 지우기 : x
  • 에디트모드에서 단어 이동 : 횟수 w

  • 에디트모드에서 단어 앞으로 이동 : 횟수 b

  • 에디트모드에서 줄앞으로 이동 : ^
  • 에디트모드에서 줄끝으로 이동 : $
  • 에디트모드에서 단어 삭제 : 횟수 dw 또는 d 횟수 w

  • 에디트모드에서 줄끝까지 삭제 : d$
  • 에디트모드에서 줄삭제 : 횟수 dd

  • 삭제 붙이기 : dd 다음 p
  • 한글자 교체 : r
  • 한글자 이상 교체 : R
  • 단어 교체 : c w 또는 c e 줄끝까지는 c $ 삭제와 같이 횟수도 넣을 수 있다.
  • 현재 파일상의 커서위치 : CTRL + g
  • 이동은 : 줄번호 SHIFT + g 줄번호 없을때는 파일의 끝으로

  • 괄호 찾기 : %
  • 어떤 줄에 처음 등장하는 old를 new로 바꾸려면 : :s/old/new
  • 한 줄에 등장하는 모든 old를 new로 바꾸려면 : :s/old/new/g
  • 두 줄 #,# 사이에서 치환을 하려면 : :#,#s/old/new/g
  • 파일 내의 모든 문구를 치환하려면 : :%s/old/new/g
  • 바꿀 때마다 확인을 거치려면 'c'를 붙여서 : :%s/old/new/gc
  • 파일의 일부를 저장하려면 : :#,# w FILENAME
  • 어떤 파일의 내용을 삽입하려면 : :r FILENAME
  • a는 현재커서의 다름에 추가 A는 그줄의 끝에 추가
  • o 를 입력하면 커서 아래에 한 줄이 열리며, 커서는 편집 모드로 열린 줄 위에 위치하게 됩니다. 대문자 O 를 입력하면 커서가 있는 줄의 위로 새 줄을 열게 됩니다.
  • 인덴트 설정은 < , >

  • :set hls , :nohlsearch 하이라이트 서치
  • :set is 증감검색
  • Vim 자체 Explore 기능 :E

소스 syntax highlight된 상태로 HTML 만들기

출처: KLTP :so $VIMRUNTIME/syntax/2html.vim 아예 .vimrc에 com -nargs=0 Html :so $VIMRUNTIME/syntax/2html.vim 이렇게 해두면 항상 :Html 만 치면 HTML이 만들어질 겁니다

.vimrc설정

" 오리지널 Vi 와의 호환성을 없애고, Vim 만의 기능들을 쓸 수 있게 함.
set nocp

" 백스페이스 사용
set bs=indent,eol,start

" 커서의 위치를 항상 보이게 함.
set ru

" 줄 번호 표시
set nu

" 줄 번호 표시 너비 설정
set nuw=5

" 탭 크기 설정
set ts=4
set sw=4

" 자동 줄바꿈 안함
set nowrap

" magic 기능 사용
set magic

" 새로 추가된 괄호의 짝을 보여주는 기능
set sm

syn on   
set nonu 
set title 
set ai showmatch hidden incsearch ignorecase smartcase smartindent hlsearch  

" 파일의 종류를 자동으로 인식
filetype on
filetype plugin on
filetype indent on

" 몇몇 커스텀 확장자들에게 파일 형식 설정
"au BufRead,BufNewFile *.dic setl ft=php
sy enable

nmap <F5> :w <CR> :! io % <CR>

set tabstop=4
set vb t_vb=
syntax on
colorscheme evening
set nocp
set bs=indent,eol,start
set ru
set nowrap
set ai showmatch hidden incsearch ignorecase smartcase smartindent hlsearch
set magic
set sm
set title

filetype on
filetype plugin on
filetype indent on

nmap <F5> : w <CR>:!io % <CR>

'unix and linux' 카테고리의 다른 글

특수 파일 삭제하기  (0) 2007.12.31
so 로딩 에러  (0) 2007.12.31
grep 사용  (0) 2007.12.30
shell 상에서 사용하는 옵션 지정하기-shopt  (0) 2007.12.29
쉘 자동화 -mysql (shell)  (0) 2007.12.29
Posted by '김용환'
,

창천 온라인에 가입되어 있었다.

무슨 생각으로 가입한지 모르겠지만, 탈퇴를 하려고 했더니...

 

아니. 주민등록 초본은 왜 우편이나 팩스로 보내라고 하는지 의심스러운 부분이 있다.

즉, 높은 보안등급을 유지하다는 핑계로 유저의 사용성을 현저하게 낮추게 하려는 wemade 사의 황당스런 탈퇴의 탈퇴 접근 용이성의 문제때문에... 언젠가 유저들의 집단항의가 이루어지지 않을까 싶겠다.

 

처음부터 가입자체를 한 것에 대한 후회막금만 온다.

 

내 느낌은..

wemade 게임 다신 안한다...

'scribbling' 카테고리의 다른 글

창의력  (0) 2008.05.29
PTSD가 외상후 스트레스성 장애였구나.  (0) 2008.05.03
엑셀 팁앤 테크  (0) 2007.10.10
혹시나 말인데..  (0) 2007.09.29
내 생전 최악의 서비스 메가패쓰  (0) 2006.08.26
Posted by '김용환'
,

grep 사용

unix and linux 2007. 12. 30. 09:25

grep abc file : file에서 abc 식을 사용한다.

grep abc *.txt : txt 확장자 파일에서 abc 패턴을 찾는다

grep '^1027' file : file에서 1027로 시작되는 패턴을 찾는다

grep '^kims$' file : file에서 kims로 시작되고 바로 끝나는 패턴을 찾는다

grep '80.' file : file에서 80. 패턴을 찾는다

grep '[we]' file : file에서 w나 e로 시작되는 패턴을 찾는다

grep '111.111|222.222' file : file에서 111.111 또는 222.222 라는 패턴을 찾는다.

grep '[A-Z]' file : file에서 A부터 Z까지 포함되는 패턴을 찾는다

grep '[A-Z]{9}' file : file에서 대문자 A부터 Z까지 포함되는 단어가 9번이상 반복되는 모든 행을 찾는다.

grep -n '111.111' file : file에서 111.111이 나타나는 행을 찾으면서 행번호도 함께 출력된다

grep -i 'aaa' file : file에서 aaa 또는 AAA 패턴을 찾는다

grep -v '111.222' file : file에서 111.222가 포함되지 않은 모든 행을 찾는다.

grep -l 'ssl' * : 패턴이 찾아진 파일의 행번 대신 파일만을 출력한다.

grep -w 'ssl' file : 패턴이 아닌 하나의 단어가 되는 ssl 단어만 찾는다.

grep -e '^asab$|(.*)?dd' file : file에서 정규표현식을 쓸 수 있도록 한다.

 

 

 

'unix and linux' 카테고리의 다른 글

so 로딩 에러  (0) 2007.12.31
vi 팁  (0) 2007.12.31
shell 상에서 사용하는 옵션 지정하기-shopt  (0) 2007.12.29
쉘 자동화 -mysql (shell)  (0) 2007.12.29
grep을 이용하여 여러개의 패턴으로 먼가를 찾기  (0) 2007.12.28
Posted by '김용환'
,

오늘 shopt라는 툴을 만나게 되었다.

shell option의 약자인데. 이 것으로 별의 별 특이한 shell의 디폴트 옵션을 지정할 수 있다.

.bashrc 와 같은 쉘 설장파일에서의 set 이 바로 이 shopt에 해당된다.

 

CTRL-D는 shell에서 logout용으로 사용된다.

[e65002 /home/www/script]# shopt -u -o ignoreeof
[e65002 /home/www/script]# shopt -o ignoreeof
ignoreeof       off

 

이를 shell에서 못쓰게 하려면. 다음과 같이 하면 된다.
[e65002 /home/www/script]# shopt -s -o ignoreeof
[e65002 /home/www/script]# shopt -o ignoreeof   (상태보기)
ignoreeof       on

 

 

자 on으로 켜놓고,

[e65002 /home/www/script]# shopt -o ignoreeof
ignoreeof       on

 

ctrl + D를 눌러보자.

[e65002 /home/www/script]# Use "logout" to leave the shell.

 

못 나간다.

 

이런 shopt는 굉장히 다양하게 사용될 수 있다.

 

 

shopt -s -o nounset

- nounset 필드를 on으로 한다.

 

=> unset 변수에 대해서 확실하게 처리해주게 한다.

 

-o

nounset Same as -u.

              -u      Treat unset variables as an error when performing param-
                      eter expansion.  If expansion is attempted on  an  unset
                      variable, the shell prints an error message, and, if not
                      interactive, exits with a non-zero status.

 

 

'unix and linux' 카테고리의 다른 글

vi 팁  (0) 2007.12.31
grep 사용  (0) 2007.12.30
쉘 자동화 -mysql (shell)  (0) 2007.12.29
grep을 이용하여 여러개의 패턴으로 먼가를 찾기  (0) 2007.12.28
bash if 문 비교  (0) 2007.11.30
Posted by '김용환'
,

shell script상에서 자동화를 하고 싶은 암호 입력 부분은 다음과 같이 해결할 수 있다.

 

 

#!/bin/sh

 

INSTALL_DIR=/usr/local/mysql

 

$INSTALL_DIR/bin/mysql -u root << !
use mysql;
update user set password=password('1234') where user ='root';
flush privileges;
!

 

 

 

'unix and linux' 카테고리의 다른 글

grep 사용  (0) 2007.12.30
shell 상에서 사용하는 옵션 지정하기-shopt  (0) 2007.12.29
grep을 이용하여 여러개의 패턴으로 먼가를 찾기  (0) 2007.12.28
bash if 문 비교  (0) 2007.11.30
[bash] 로깅 시간 출력  (0) 2007.11.14
Posted by '김용환'
,
grep -E "111.111.111.111|222.222.222.222" a.txt

'unix and linux' 카테고리의 다른 글

shell 상에서 사용하는 옵션 지정하기-shopt  (0) 2007.12.29
쉘 자동화 -mysql (shell)  (0) 2007.12.29
bash if 문 비교  (0) 2007.11.30
[bash] 로깅 시간 출력  (0) 2007.11.14
netstat 과 tcp 상태  (0) 2007.10.31
Posted by '김용환'
,

프로그램은 왜 실패하는가?의 저자 Zeller교수의 논문

"Isolating CauseEffect Chains from Computer Programs" 이다.

 

http://www.st.cs.uni-sb.de/papers/fse2002/p201-zeller.pdf

 

책 한권의 내용이 이 논문에 잘 담겨져 있다.

 

디버깅의 방법, 그리고 어떻게 하면 디버깅이 가능한지 잘 정리되어 있다.

 

Idea -> 형상화

 

 

 

Posted by '김용환'
,

 

HTTPD –L은 다음과 같습니다.

 

-L          Output a list of directives together  with  expected  argu-ments and places where the directive is valid.

 

[e61128 /usr/local/apache/bin]# httpd -L > module

11.txt 참조하세요.

아파치에서 사용하는 directivedirective를 포함하는 모듈과의 상관관계와 설명이 나와있습니다.

 

 

 

Httpd –l static module list를 알려주는 것입니다.

-l          Output a list of modules compiled into the server.

 

[e61128 /usr/local/apache/bin]# httpd -l

Compiled in modules:

  core.c

  mod_access.c

  mod_auth.c

  mod_include.c

  mod_log_config.c

  mod_env.c

  mod_setenvif.c

  prefork.c

  http_core.c

  mod_mime.c

  mod_status.c

  mod_autoindex.c

  mod_asis.c

  mod_cgi.c

  mod_negotiation.c

  mod_dir.c

  mod_imap.c

  mod_actions.c

  mod_userdir.c

  mod_alias.c

  mod_so.c

 

 

우리가 보던 설정파일 httpd.conf의 내용중 Dynamic Shared Object는 위의 httpd –l 리스트에 나오면 안나오도록 설계가 되어 있죠.

 

#

# Dynamic Shared Object (DSO) Support

#

# To be able to use the functionality of a module which was built as a DSO you

# have to place corresponding `LoadModule' lines at this location so the

# directives contained in it are actually available _before_ they are used.

# Statically compiled modules (those listed by `httpd -l') do not need

# to be loaded here.

#

# Example:

# LoadModule foo_module modules/mod_foo.so

#

Include conf/mod_charset.conf

Include conf/mod_deflate.conf

Include conf/mod_dosevasive20.conf

Include conf/mod_headers.conf

Include conf/mod_jk.conf

Include conf/mod_proxy.conf

Include conf/mod_proxy_connect.conf

Include conf/mod_proxy_ftp.conf

Include conf/mod_proxy_http.conf

Include conf/mod_rewrite.conf

Include conf/mod_security.conf

Include conf/mod_url.conf

 

 

, LoadModule.conf파일의 경우는 Load를 하되. Load가 되면, forcecharset을 먹이라는 뜻이죠.

LoadModule charset_module     modules/mod_charset.so

 

<IfModule mod_charset.c>

        ForceCharset KSC5601

</IfModule>

 

모듈 리스트에는 mod_charset.c이 포함되어 있습니다.

[e61128 /usr/local/apache/modules]# ll

ÇÕ°è 1388

drwxr-xr-x   2 www www   4096  8¿ù 31 15:45 .

drwxr-xr-x  15 www www   4096  8¿ù 31 15:45 ..

-rw-r--r--   1 www www   8504  8¿ù 31 15:44 httpd.exp

-rwxr-xr-x   1 www www  26687  8¿ù 31 15:45 mod_charset.so

-rwxr-xr-x   1 www www  22892  8¿ù 31 15:45 mod_comicsession2.so

-rwxr-xr-x   1 www www  38228  8¿ù 31 15:45 mod_deflate.so

-rwxr-xr-x   1 www www  36115  8¿ù 31 15:45 mod_dosevasive20.so

-rwxr-xr-x   1 www www  35061  8¿ù 31 15:45 mod_headers.so

-rwxr-xr-x   1 www www 462702  8¿ù 31 15:45 mod_jk.so

-rwxr-xr-x   1 www www 177095  8¿ù 31 15:45 mod_nvidsession.so

-rwxr-xr-x   1 www www  96087  8¿ù 31 15:45 mod_proxy.so

-rwxr-xr-x   1 www www  26845  8¿ù 31 15:45 mod_proxy_connect.so

-rwxr-xr-x   1 www www  67218  8¿ù 31 15:45 mod_proxy_ftp.so

-rwxr-xr-x   1 www www  64674  8¿ù 31 15:45 mod_proxy_http.so

-rwxr-xr-x   1 www www 115709  8¿ù 31 15:45 mod_rewrite.so

-rwxr-xr-x   1 www www 152415  8¿ù 31 15:45 mod_security.so

-rwxr-xr-x   1 www www  21083  8¿ù 31 15:45 mod_url.so

 

만약 mod_charset.so 파일이 없는 상태에서, httpd restart를 하면 다음의 결과가 나옵니다.

[e65004 /usr/local/apache/modules]# mv mod_charset.so mod_charset1.so

[e65004 /usr/local/apache/modules]# ../bin/httpd -k graceful

Syntax error on line 2 of /usr/local/apache/conf/mod_charset.conf:

Cannot load /usr/local/apache/modules/mod_charset.so into server: /usr/local/apache/modules/mod_charset.so: cannot open shared object file: No such file or directory

 

참고하세요.

 

결론은

, 정적인 모듈은 httpd –l 로 확인할 수 있고, 동적인 모듈은 LoadModule시 에러가 나지 않으면 동적으로 로딩됨을 확인이 가능합니다.

 

l  혹시 잼난거 있으면 서로 공유해요~~

 

Manual httpd는 아래의 주소를 참조했습니다.

http://www.hmug.org/man/8/httpd.php

Posted by '김용환'
,