[완료]CentOS-5.0 python-2.5.1 설치하기

cshong의 이미지

#rpm -q python 명령으로 확인을 하니 python2.4버전이 설치가 되어 있었습니다.

#rpm -e python 명령으로 삭제를 하는데 되지 않는 것이였습니다.
그래서 --nnodeps 옵션으로 삭제를 하니 yum 명령어가 먹질 않았습니다.
좌절 할 뻔했지만 vmware였고 백업본이 있어서 다시 작업을 했습니다.

python2.4는 삭제 하지 않고 2.5.1을 설치하기로 마음먹었습니다.
#./configure --prefix=/usr/local/python
#make
#make install

설치가 끝난 시점에서 yum명령어 잘 되었습니다.
헌데 python명령을 주니 버전이 여전히 2.4였습니다.
그래서 /usr/bin 디렉토리의 python, python2, python2.4를 삭제하고,
/usr/local/python/bin 디렉토리의 python과 python2.5를 /usr/bin 디렉토리안에 복사해 넣었습니다.
잘 작동했습니다.
그... 그런... 데... yum 명령어가 더이상 되지 않았습니다.
에러 메시지는 다음과 같았습니다.
이럴때 어떻게 해결해야 하나요?

There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named yum

Please install a package which provides this module, or verify that the module is installed correctly.

I'ts possible that the above module doesn't match the
cureent version of Python, which is:
2.5.1 (r251:54863, Jul 4 2007, 00:27:25)
[GCC 4.1.1 20070105 (Red Hat 4.1.1-52)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq

feanor의 이미지

python2.4를 지우지 마세요.

python 명령 줬을 때 2.5가 뜨게 하려면 export PATH=$PATH:/usr/local/python/bin 처럼 PATH를 잡아주시면 됩니다.

cshong의 이미지

2.4를 삭제하지 않고 2.5를 설치까지 완료는 했습니다.
그리고 export PATH=$PATH:/usr/local/python2.5/bin
명령어까지 줬습니다.
어떠한 메시지가 나오지 않는 것으로 봐서 명령어가 잘 먹혔나 생각했는데
#python
명령어를 주면 여전히 2.4가 실행이 됩니다.
그래서 지금은 /usr/local/python2.5/bin/python 경로를 다 주고 있습니다. T-T

================================
생각만 해서는 아무것도 이룰 수 없다.. 행동하라!!

================================
생각만 해서는 아무것도 이룰 수 없다.. 행동하라!!

feanor의 이미지

아 죄송합니다. 당연히 새 디렉토리를 PATH 앞에 넣어주셔야 합니다. export PATH=/usr/local/python2.5/bin:$PATH, 등등.

cshong의 이미지

아.. 잘 됩니다.
덕분에 잘 해결하고 배우고 갑니다. ^^

================================
생각만 해서는 아무것도 이룰 수 없다.. 행동하라!!

================================
생각만 해서는 아무것도 이룰 수 없다.. 행동하라!!

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.