September 5, 2010 | Posted by
admin | Category: Linux Administration
The error message “unpacking of archive failed on file /usr/bin/xxxx: cpio: open Failed” indicates that the system failed to install the rpm since it cannot unpack the package under the /usr/bin directory.
For example, you may see the error message as stated below while installing a ‘nano’ package using yum
Error unpacking rpm package nano-1.x.x.i386
error: unpacking of archive failed on file /usr/bin/nano;
4c70f874: cpio: open Failed:
This indicates that the file /usr/bin/nano cannot be created under the /usr/bin directory which mostly happens if an attribute is set on the directory.
Use the ‘lsattr’ command to check if an attribute is set on the directory:
# lsattr /usr | grep bin
----i-----I-- /usr/bin
If the file/directory have an immutable bit (lowercase ‘i’) set as shown in the above output, it indicates that the permissions to write in the file/directory has been denied.
To remove the immutable bit, use the ‘chattr’ command:
# chattr -i /usr/bin
Once done, you can successfully install the rpm.
Important:
In some cases though, the rpm file itself is corrupt and cannot be installed, so it is also recommended to try install the rpm on another server to see if it works. If it fails on another server too, you should download the package from a different website / mirror.
August 31, 2010 | Posted by
admin | Category: Linux Administration
You may receive the error “-bash: phpize: command not found” while executing the “phpize” command. The reason is the php-devel package is not installed on the server. The easiest way to install the package is to use ‘yum’.
SSH to your server as root and execute:
# yum install php-devel
Once done, you should be able to execute the command ‘phpize’.
Comments Off on phpize: command not found
August 25, 2010 | Posted by
admin | Category: Linux Administration
The error message “Can’t create/write to file /tmp/” appears when any application tries to write it’s temporary files to the /tmp directory and the /tmp directory don’t have a world writable permissions. To fix the issue, make sure the /tmp directory have 777 permissions.
1) SSH to your server as root.
2) Set the permissions of /tmp directory
# chmod 1777 /tmp
3) To verify the permissions, execute
# ls -ld /tmp
drwxrwxrwt 6 root root 4096 Aug 25 11:23 /tmp/
Once done, the website/application should work fine.
Comments Off on Can’t create/write to file /tmp/ (Errcode: 13)
August 21, 2010 | Posted by
admin | Category: Linux Administration
Update: If “mysql_fix_privilege_tables” command does not exist, look at Section 2.
You may receive a “Table ‘mysql.servers’ doesn’t exist” error message while adding a database user in Plesk OR while restarting the Mysql service. The complete error message look like:
Error: Connection to the database server has failed:
Table 'mysql.servers' doesn't exist
OR
Can't open and lock privilege tables:
Table 'mysql.servers' doesn't exist
The problem mostly occurs when Mysql is upgraded which introduce newer version of tables and the default Mysql database is not aware of these changes. The “mysql_fix_privilege_tables” command is use to update the Mysql database with the latest contents of the newer version and to fix the privileges of the database users as well.
Section 1:
To fix the issue, SSH to your server and execute:
On a plain Linux OR Linux/cPanel server:
# mysql_fix_privilege_tables --user=root\
--password=mysqlpasswordhere --verbose
On a Linux/Plesk server:
# mysql_fix_privilege_tables --user=admin\
--password=`cat /etc/psa/.psa.shadow` --verbose
where, –verbose will display the detailed output.
Section 2:
mysql_upgrade command have superseded mysql_fix_privilege_tables. mysql_fix_privilege_tables is an older script that previously was used to upgrade the system tables in the Mysql database .
To fix the issue, you need to replace mysql_fix_privilege_tables with mysql_upgrade in the above stated commands, i.e.
On a plain Linux OR Linux/cPanel server:
# mysql_upgrade --user=root --password=mysqlpasswordhere --verbose
On a Linux/Plesk server:
# mysql_upgrade --user=admin\
--password=`cat /etc/psa/.psa.shadow` --verbose
August 13, 2010 | Posted by
admin | Category: Linux Administration
The error message “make: *** [ffmpeg_frame.lo] Error 1” is received while compiling ffmpeg-php and the reason is the missing ffmpeg_frame.lo file. The ffmpeg-php directory contains a ‘ffmpeg_frame.loT’ file which actually should be ‘ffmpeg_frame.lo’.
The solution is to rename the file ffmpeg_frame.loT to ffmpeg_frame.lo. Go to the directory
# cd /path/to/directory/ffmpeg-php-0.x.x
and rename the file
# cp ffmpeg_frame.loT ffmpeg_frame.lo
Once done, compile ffmpeg-php again.
Related Links:
Unable to load dynamic library ffmpeg.so OR error PIX_FMT_RGBA32
Comments Off on make: ffmpeg_frame.lo error while compiling ffmpeg-php