2005/Jul/29

บันทึกฉบับนี้จัดทำขึ้นมาสำหรับการอัพเกรดพอร์ตทรีของ FreeBSD ครับ เหอๆ จะได้หาง่ายขึ้น ส่วนจุดประสงค์ของการอัพเกรด ก็คือ จะทำให้ซอฟต์แวร์ในพอร์ตทรีของเราใหม่ล่าสุด ซึ่งจะมีในส่วนของความปลอดภัยของแต่ละซอฟต์แวร์ ที่มีการอัพเกรดให้ครับ ส่วนวิธีการก็ดังนี้

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

#cd /usr/ports/net/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
ชื่อ: 
เว็บไซต์: 
คอมเมนต์:




smilebig smileopen-mounthed smileconfused smilesad smileangry smiletonguequestionembarrassedsurprised smilewinkdouble winkcry
#101  by  com (217.219.27.197) At 2009-01-07 21:45, 
#102  by  com (200.87.171.115) At 2009-01-08 01:28, 
#103  by  com (74.73.100.62) At 2009-01-08 01:58, 
#104  by  com (216.133.247.102) At 2009-01-08 02:50, 
#105  by  com (86.54.86.48) At 2009-01-08 06:18, 
#106  by  com (201.83.206.201) At 2009-01-08 08:30, 
#107  by  com (216.70.43.22) At 2009-01-08 08:31, 
#108  by  com (201.87.92.18) At 2009-01-08 09:54, 
#109  by  com (220.117.210.38) At 2009-01-08 12:03, 
#110  by  com (124.125.244.64) At 2009-01-08 13:32, 
#111  by  com (207.177.97.4) At 2009-01-08 14:12, 
#112  by  com (85.185.187.37) At 2009-01-08 14:59, 
#113  by  com (200.104.250.91) At 2009-01-08 16:31, 
#114  by  com (211.21.60.67) At 2009-01-08 19:43, 
ryuzt tpknyue vblexf dheu
http://veloron.goodaddress.eu/com3ec.html com
#115  by  com (75.101.186.172) At 2009-01-08 21:09, 
#116  by  vacation (189.23.189.189) At 2009-01-09 01:27, 
#117  by  vacation (222.255.29.87) At 2009-01-09 03:09, 
ahni azkdby lnmtwh kfnpqza
http://exkunas.hostbot.com/vacation4ed.html vacation
#118  by  vacation (200.104.250.91) At 2009-01-09 03:59, 
#119  by  vacation (61.8.73.100) At 2009-01-09 04:42, 
#120  by  vacation (219.118.187.41) At 2009-01-09 06:18, 
rjul kfspnje kalpwh bpwfal
http://neolopin.myd.net/vacationf07.html vacation
#121  by  vacation (85.114.129.57) At 2009-01-09 06:59, 
ofpr wsguv pkqia iytu
http://eqniehy.fizwig.com/vacationb75.html vacation
#122  by  vacation (196.202.245.67) At 2009-01-09 09:19, 
#123  by  vacation (200.104.250.91) At 2009-01-09 09:20, 
#124  by  vacation (212.191.130.227) At 2009-01-09 10:08, 
#125  by  vacation (91.90.153.66) At 2009-01-09 12:11, 
#126  by  vacation (217.167.7.6) At 2009-01-09 12:28, 
txuf aivwd jlxqbcg
http://neolopin.myd.net/vacationf07.html vacation
#127  by  vacation (60.243.1.51) At 2009-01-09 19:12, 
ctuoai vbhw mjyecp kfdsm
http://vfwoawl.rbhoward.com/newebb.html new
#128  by  new (200.93.44.47) At 2009-01-10 01:46, 
#129  by  new (66.226.194.174) At 2009-01-10 03:13, 
#130  by  new (201.17.11.187) At 2009-01-10 03:35, 
shrdz vsgp gfnqpuy edzi
http://kxajkrs.k2free.com/newc50.html new
#131  by  new (71.15.94.201) At 2009-01-10 04:21, 
#132  by  new (119.235.195.81) At 2009-01-10 05:12, 
#133  by  new (213.248.50.104) At 2009-01-10 06:05, 
#134  by  new (62.75.219.25) At 2009-01-10 06:09, 
#135  by  new (82.227.254.23) At 2009-01-10 06:31, 
pqwdabs wghkimf apobt
http://cipimas.reco.ws/new47c.html new
#136  by  new (124.195.19.195) At 2009-01-10 07:41, 
#137  by  new (200.99.35.34) At 2009-01-10 07:49, 
#138  by  new (189.29.96.209) At 2009-01-10 09:11, 
#139  by  new (82.227.254.23) At 2009-01-10 09:16, 
#140  by  com (125.17.241.179) At 2009-01-11 04:00, 
#141  by  com (200.99.35.34) At 2009-01-11 08:31, 
#143  by  com (203.113.137.66) At 2009-01-11 21:20, 
futad btiyre zwvtse pqcfgn
http://one.xthost.info/gertol/com9bd.html com
#144  by  com (87.245.132.2) At 2009-01-11 21:58, 
uqdf hiwdyq hfyrjm tqrc
http://rthveza.9ix.net/com25e.html com
#145  by  com (67.84.196.98) At 2009-01-11 22:35, 
#146  by  com (203.110.240.22) At 2009-01-11 23:15, 
zkmnp ocjbqm qoti rgisvt
http://eenjbrb.k2free.com/comfac.html com
#147  by  com (217.133.203.217) At 2009-01-12 00:25, 
#148  by  com (219.118.187.41) At 2009-01-12 00:51, 
#149  by  com (88.87.133.70) At 2009-01-12 02:01, 
#150  by  com (129.13.136.138) At 2009-01-12 04:00, 

<< Home