### mysql 4.0.27 thread에러 해결 방법  ###

에러메시지
: checking "LinuxThreads"... "Not found"
: configure: error: This is a linux system and Linuxthreads was not
: found. On linux Linuxthreads should be used.  Please install Linuxthreads
: (or a new glibc) and try again.  See the Installation chapter in the
: Reference Manual for more information.

 
이문제는 mysql-4.0의 NPTL 의 안정성을 너무 고려한 나머지 발생한 버그로
다음과 같이 변경해서 컴파일 하면 해결할수 있습니다
 
우선 echo '/* Linuxthreads */' >> /usr/include/pthread.h
를 통해서 헤더파일을 수정하고, 또는 vi /usr/include/pthread.h파일을 열어 맨 하단에
/* Linuxthreads */ 이것만 추가하면된다
 
두번째로 컴파일 시 아래와 같이 옵션을 추가해서 컴파일 하면 오류없이 mysql을
설치하실수 있습니다.



출처: http://kensei.co.kr/303 [KENSEI IT BLOG]


configure 후  make&make install 시 오류 발생

 

mysql.cc: In function 'void print_table_data(MYSQL_RES*)':

mysql.cc:1650: error: expected primary-expression before '?' token

mysql.cc:1650: error: expected ':' before ')' token

mysql.cc:1650: error: expected primary-expression before ')' token

mysql.cc:1652: error: expected primary-expression before '?' token

mysql.cc:1652: error: expected ':' before ')' token

mysql.cc:1652: error: expected primary-expression before ')' token

mysql.cc:1666: error: expected primary-expression before '?' token

mysql.cc:1666: error: expected ':' before ')' token

mysql.cc:1666: error: expected primary-expression before ')' token

make[1]: *** [mysql.o] Error 1

make[1]: Leaving directory `/usr/local/src/APM_Setup/mysql-4.0.27/client'

make: *** [install-recursive] Error 1

 

이런식으로 뜨면 gcc버전 문제로 설치가 안 된다고 함.

 보통의 경우 gcc 및 g++ 버전이 높아 설치시 에러가 뜨는 것인데

 대처 방법은 우선 호환성 라이브러리 패키지를 설치해주고


[해결방법]

# yum install compat-*

 

gcc와 g++의 이름변경으로 백업후 gcc34, g++34 심볼릭 링크로 gcc,gcc++를 생성해주면된다

# cd /usr/bin

# mv gcc gcc-backup

# mv g++ g++-backup

# ln -s gcc34 gcc

# ln -s g++34 g++

 

설치 후에는 make & make install로 설치 진행


참고 sosnote.com


출처: http://narusika.tistory.com/entry/mysql-make시에-에러-발생-error-expected-primaryexpression-before-token [냐호냐호]


pecl 로 sqlsrv 또는 pdo_sqlsrv 설치시 아래와 같은 에러가 발생하면

/tmp/pear/temp/sqlsrv/shared/xplat.h:36:17: fatal error: sql.h: No such file or directory
 #include
 ^
 compilation terminated.
 make: *** [conn.lo] Error 1
 ERROR: `make’ failed

yum -y install unixODBC unixODBC-devel 명령을 실행한다.



configure: error: readline library not found
yum -y install readline readline-devel


php 소스 컴파일시 아래와 같은 오류가 발생하는 경우가 있다. 

gcc 4.7 버전에서 아래와 같은 오류가 발생한다. 

/home/segio_php/php-5.2.17/ext/dom/node.c: In function ‘dom_canonicalization’:
/home/segio_php/php-5.2.17/ext/dom/node.c:1953:21: error: dereferencing pointer to incomplete type
/home/segio_php/php-5.2.17/ext/dom/node.c:1955:5: error: dereferencing pointer to incomplete type



이때는 아래와 같은 순서로 php 소스를 패치하면 오류가 사라진다. 

[root@localhost] wget -O php.patch  https://mail.gnome.org/archives/xml/2012-August/txtbgxGXAvz4N.txt
[root@localhost] cd php-5.2.17
[root@localhost] patch -p0 -b < php.patch
patching file ext/dom/node.c
Hunk #1 succeeded at 1950 (offset 55 lines).
patching file ext/dom/documenttype.c
Hunk #1 succeeded at 215 (offset 10 lines).
patching file ext/simplexml/simplexml.c
Hunk #1 succeeded at 1343 (offset -74 lines).

patch 명령어를 찾을 수 없다고 할 경우 yum -y install patch

위와 같이 패치를 적용한 후 컴파일을 하면 문제없이 진행된다. 

 

[출처] http://blog.naver.com/ssik425/10175143994


/usr/local/apache/bin/apachectl restart 를 이용해 


Apache를 재시작 하려는데 다음과 같은 메시지가 뜨는 경우가 있습니다.

=================================================
(20014)Internal error: Error retrieving pid file logs/httpd.pid
Remove it before continuing if it is corrupted.

=================================================



기존에 구동중인 아파치가 정상 종료 되지 않을 경우 프로세스가 남아 있게 되어 발생되는 부분으로

구동중인 httpd 데몬을 전부 종료하고 다시 시작하시면 되겠습니다.


종료:
killall -9 httpd

구동:
/usr/local/apache/bin/apachectl start

그래도 정상 구동이 되지 않을 시 해당 httpd.pid 파일을 삭제 하신 뒤 재시작하여 보시기 바랍니다.

해당 파일은 구동 시 자동 생성 되는 파일이므로 삭제 후 재시작을 하여도 무방합니다.

출처 : http://faq.hostway.co.kr/Linux_WEB/7565


[해결] yum install libtool-ltdl-devel


dovecot은 POP3, IMAP등 메일을 전송받기 위한 서비스 데몬입니다.

해당 데몬을 세팅중에 다음과 같은 에러를 만나며 메일을 받을 수 없는 문제를 만났습니다.
[code]Feb  8 19:26:56 Tomeii dovecot: Dovecot v1.0.7 starting up
Feb  8 19:27:01 Tomeii dovecot: chdir(/home/users/eye) failed with uid 123: Permission denied
Feb  8 19:27:01 Tomeii dovecot: child 4170 (pop3) returned error 89[/code]
보안상 디렉토리 퍼미션을 많이 바꾸던것이 문제가 된것 같습니다.

* 위 로그가 발생하면 아웃룩등 메일클라이언트 프로그램에서 로그인이 안되는 문제가 발생합니다.

사용자 디렉토리의 모든 상위 디렉토리가 최소 711이상의 퍼미션을 가지고 있어야 합니다.
[code]# chmod 711 /home
# chmod 711 /home/users[/code]
와 같이 group과 other에 최소한 1(execute) 권한을 주면 해당 오류가 사라집니다.


리눅스 시스템을 운영하다 보면 어느순간 시스템의 시간이 한국 표준시와 맞지 않은 경우를 발견하게 된다.

이럴 때의 조치방법을 요약한다.

보통  rdate -s time.bora.net && hwclock -w 명령어를 실행하게 되면 시스템 시간과 CMOS 의 시간을

동기화 시키는 것인데 일단 위 명령어는 틀림이 없으나 위 방법을 실행해도 시간이 한국 표준시로 설정이

안되는 경우가 있다. 이런 경우는 시스템의 타임존이 아시아/서울 (한국 표준시) 로 지정되지 않았기 때문이다.

이를 해결하기 위해선 # cp /usr/share/zoneinfo/Asia/Seoul /etc/localtime  명령어로 아시아/서울의

타임존을 시스템의 로컬타임으로 설정한다음에

# rdate -s time.bora.net && hwclock -w  명령을 수행해야 정상적으로 적용된다.

덮어씌울거냐고 물어볼땐 무조건 yes 하면 되며

작업 후에는 반드시 date 명령어로 정상적으로 시간이 설정되었는지를 확인해본다.


(참고)
# date (휴대폰을 꺼내 현재 시간과 날짜가 맞는지 확인)
# hwclock -w (현 시스템 시간을 BIOS 시간과 동기화 시킴.)
# hwclock -r (하드웨어 시간을 표시한다.)
# reboot (재부팅 이후 정상적으로 시간이 맞는지 필히 확인한다.)


OS를 새로깔고 yum으로 package들을 설치할려고 하는데 다음과 같은 에러가 발생 하였다

 Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base

이경우 resolv.conf 에 nameserver 정보를 작성하지 않아 발생한 error

#] vi /etc/resolv.conf

[추가]

nameserver 168.126.63.1

네임서버 IP를 입력하고 재시도하면 된다.