ERROR: There's not enough space in /var/lib/mysql/

Ubuntu 23 เม.ย. 2012

หลังจากที่ใช้ sudo apt-get -f install เพื่อ upgraded packages mysql-server-5.1

ระบบแจ้งว่า

Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following extra packages will be installed:
mysql-server-5.1
Suggested packages:
tinyca mailx
The following packages will be upgraded:
mysql-server-5.1
1 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
19 not fully installed or removed.
Need to get 0 B/6,385 kB of archives.
After this operation, 4,096 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages …
(Reading database … 37525 files and directories currently installed.)
Preparing to replace mysql-server-5.1 5.1.58-1ubuntu1 (using …/mysql-server-5.1_5.1.61-0ubuntu0.11.10.1_amd64.deb) …
ERROR: There’s not enough space in /var/lib/mysql/
dpkg: error processing /var/cache/apt/archives/mysql-server-5.1_5.1.61-0ubuntu0.11.10.1_amd64.deb (–unpack):
subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/mysql-server-5.1_5.1.61-0ubuntu0.11.10.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

ปัญหานี้เกิดจาก
เวลาเราสั่ง apt-get ไม่ว่าจะ install หรือ upgrade มันจะดึงโปรแกรมมาเก็บไว้ในใน /var/cache/apt/archives/ หากนานวันเข้าเราไม่เคลียร์ พื้นที่ก็จะเยอะขึ้นเรื่อย ๆ ให้เราใช้คำสั่ง apt-get clean เพื่อลบ package ที่เราเคยติดตั้งไปแล้ว
หากใช้คำสั่งข้างต้นไปแล้วยังไม่ได้อีก ให้ clear log ทิ้ง

แท็ก

Onyx

Just a middle-aged programmer, Can do many things but not the most.