วันเสาร์ที่ 11 มกราคม พ.ศ. 2557

Ports Upgrading FreeBSD

Ports Upgrading

ติดตั้ง cvsup โดยไปที่ /usr/ports/net/cvsup-without-gui และทำการติดตั้งได้เลยครับ
#cd /usr/local/cvsup-without-gui
#make install clean

จากนั้นก็ทำการ synchronize ports index กับเซิร์ฟเวอร์ที่เป็น cvsup server โดยผมเลือก cvsup.jp.freebsd.org เพราะทำการ ping ดูแล้ว ได้เวลาเร็วสุด เมื่อเทียบกับเซิร์ฟเวอร์อื่นๆครับ โดยใช้คำสั่ง

#/usr/local/bin/cvsup -g -L 2 -h cvsup.jp.freebsd.org /usr/share/examples/cvsup/ports-supfile

จากนั้นก็ทำการติดตั้ง portupgrade ครับ

#cd /usr/ports/sysutils/portupgrade
#make install clean

ทำการอัพเดต ports database

#/usr/local/sbin/portsdb -Uu

ทำการค้นหาโปรแกรมที่เคยติดตั้งไปแล้ว แต่ยังไม่ใหม่ล่าสุด เพื่อทำการอัพเดตครับ

#/usr/local/sbin/portversion -l "<"

ทำการอัพเดตโปรแกรมที่เคยติดตั้งแล้ว ให้ใหม่ล่าสุดครับ

#/usr/local/sbin/portupgrade -arR

ถ้าไม่เกิดปัญหาระหว่างการอัพเดต ก็ใช้คำสั่งถัดไปได้เลยครับ

#/usr/local/sbin/pkgdb -F

แต่ถ้าเกิดปัญหาขึ้นมา แบบนี้

campus# /usr/local/sbin/portsdb -Uu
Updating the ports index ... Generating INDEX.tmp - please wait..make: don't know how to make describe. Stop
===> textproc/p5-Sort-PolySort failed
*** Error code 1
1 error

ก็ใช้คำสั่ง

#/usr/local/sbin/pkgdb -fu

แต่ถ้ายังเกิดปัญหาลักษณะแบบนี้ ซึ่งเกิดจากการที่เราเคยติดตั้ง และใช้งาน FreeBSD มานานแล้ว จนเวอร์ชันของ portupgrade นั้นเปลี่ยน ซึ่งลักษณะของ error เป็นดังนี้ครับ

campus# /usr/local/sbin/portsdb -Uu
Updating the ports index ... Generating INDEX.tmp - please wait..make: don't know how to make describe. Stop
===> ftp/lukemftpd failed
*** Error code 1
1 error

********************************************
Before reporting this error, verify that you are running a supported
version of FreeBSD (see http://www.FreeBSD.org/ports/) and that you
have a complete and up-to-date ports collection. (INDEX builds are
not supported with partial or out-of-date ports collections -- in
particular, if you are using cvsup, you must cvsup the "ports-all"
collection, and have no "refuse" files.) If that is the case, then
report the failure to ports@FreeBSD.org together with relevant
details of your ports configuration (including FreeBSD version,
your architecture, your environment, and your /etc/make.conf
settings, especially compiler flags and WITH/WITHOUT settings).

Note: the latest pre-generated version of INDEX may be fetched
automatically with "make fetchindex".
********************************************

*** Error code 1

Stop in /usr/ports.
*** Error code 1

Stop in /usr/ports.
failed to generate INDEX!
portsdb: index generation error

วิธีการแก้ปัญหาก็คือ ให้เอาโปรแกรม portupgrade ออกก่อน แล้วก็ทำการ ติดตั้ง portupgrade ใหม่ครับ

#cd /usr/ports/sysutils/portupgrade
#make deinstall
#make install clean

ไม่มีความคิดเห็น:

แสดงความคิดเห็น