Tag Archives: rpm

When linux installs rpm, it prompts: can’t create transaction lock on /var/lib/rpm/.rpm.lock error

Install the RPM package under Linux with a non-root user. Error can’t create transaction lock on /var/lib/ RPM /.rpm. Lock.

[hadoop@hadoop186 rpm]$ rpm -ivh libconfuse-2.5-4.el5.x86_64.rpm 
Warning: libconfuse-2.5-4.el5.x86_64.rpm: ヘッダ V3 DSA/SHA1 Signature, key ID 217521f6: NOKEY
エラー: can't create transaction lock on /var/lib/rpm/.rpm.lock (許可がありません)

 

Error reason: Permission problem

[hadoop@hadoop186 sbin]$ ll  /var/lib/rpm/
Totally 95584
-rw-r--r--. 1 root root 10678272  7月 10 11:41 2014 Basenames
-rw-r--r--. 1 root root    12288  5月  4 11:58 2014 Conflictname
-rw-r--r--. 1 root root  2170880  7月 10 11:41 2014 Dirnames
-rw-r--r--. 1 root root 10604544  7月 10 11:41 2014 Filedigests
-rw-r--r--. 1 root root    36864  7月 10 11:41 2014 Group
-rw-r--r--. 1 root root    24576  7月 10 11:41 2014 Installtid
-rw-r--r--. 1 root root    86016  7月 10 11:41 2014 Name
-rw-r--r--. 1 root root    24576  5月  5 15:29 2014 Obsoletename
-rw-r--r--. 1 root root 73293824  7月 10 11:41 2014 Packages
-rw-r--r--. 1 root root  1331200  7月 10 11:41 2014 Providename
-rw-r--r--. 1 root root   667648  7月 10 11:41 2014 Provideversion
-rw-r--r--. 1 root root    12288  3月 27 14:11 2014 Pubkeys
-rw-r--r--. 1 root root   512000  7月 10 11:41 2014 Requirename
-rw-r--r--. 1 root root   323584  7月 10 11:41 2014 Requireversion
-rw-r--r--. 1 root root   163840  7月 10 11:41 2014 Sha1header
-rw-r--r--. 1 root root    77824  7月 10 11:41 2014 Sigmd5
-rw-r--r--. 1 root root    12288  3月 27 14:46 2014 Triggername
-rw-r--r--  1 root root    24576  7月 10 11:41 2014 __db.001
-rw-r--r--  1 root root   229376  7月 10 11:41 2014 __db.002
-rw-r--r--  1 root root  1318912  7月 10 11:41 2014 __db.003
-rw-r--r--  1 root root   753664  7月 10 11:41 2014 __db.004

solution:
Enter “su” and password at the terminal, log in root, and log in as root will not be prompted

[hadoop@hadoop186 rpm]$ su - root
パスワード:
[root@hadoop186 ~]# pwd
/root
[root@hadoop186 ~]# cd /home/hadoop/rpm/
[root@hadoop186 rpm]# ll
合計 164
-rw-rw-r--. 1 hadoop hadoop 31792  6月 20 17:00 2014 argtable-2.13-2.el6.x86_64.rpm
-rw-rw-r--  1 hadoop hadoop 87025  7月 10 11:38 2014 libconfuse-2.5-4.el5.x86_64.rpm
-rw-rw-r--  1 hadoop hadoop 15013  7月 10 11:38 2014 libconfuse-devel-2.5-4.el5.x86_64.rpm
-rw-rw-r--. 1 hadoop hadoop 26256  6月 20 17:00 2014 log4c-devel-1.2.4-1.el6.x86_64.rpm
[root@hadoop186 rpm]# rpm -ivh libconfuse-2.5-4.el5.x86_64.rpm 
警告: libconfuse-2.5-4.el5.x86_64.rpm: ヘッダ V3 DSA/SHA1 Signature, key ID 217521f6: NOKEY
準備中...                ########################################### [100%]
   1:libconfuse             ########################################### [100%]
[root@hadoop186 rpm]# rpm -ivh libconfuse-devel-2.5-4.el5.x86_64.rpm
警告: libconfuse-devel-2.5-4.el5.x86_64.rpm: ヘッダ V3 DSA/SHA1 Signature, key ID 217521f6: NOKEY
準備中...                ########################################### [100%]
   1:libconfuse-devel       ########################################### [100%]
[root@hadoop186 rpm]# 

Error: Failed dependencies: error encountered when installing rpm package

Under Linux install RPM packages often encounter the following problem:
error: Failed dependencies:
… The
ellipsis indicates the missing package for installing this RPM.
when you encounter this problem, you can add two parameters after the installation of RPM package command, such as:
rpm-ivh libstdc++5.0-3.3.3-62745cl.i386. RPM
is changed to:
RPMS -ivh libstdc++5.0-3.3.3-62745cl.i386. RPM –nodeps –force

plus those two parameters mean that
is installed without having to dependencies among packets, and
does not count error: Failed dependencies: such errors
In RedHat Linux and Other RedHat compliant distributions such as Mandrake, the entire distribution is installed using RPM. So the best way to install new software is to

downloading RPM packages from the network.
1) to install a package using an RPM, the simplest command is as follows:

# rb-ivh foo-1.0l-l.is386.rpm (the package in question is foo-1.0l-l.is386.rpm, all of the following)

foo#################### ############. Installation is simple.

2) remove installed packages
to uninstall package foo, simply enter the following command:

# rpm-e foo

note: the package name is foo, not the RPM file name “foo-1.01-l.b.i. 386.rpm”.

3) upgrading packages to upgrade the software is similar to install the software:

# RPM – Uvh foo – 2.0 – l.i 386 RPM

foo# # # # # # # # # # # # # # # # # # # #

user note: RPM will automatically install the old version of the corresponding software package. Rpmsave

saving /etc/foo.conf as /etc/foo.conf.rpmsave

so that the user can manually change the configuration file. In addition, if the user wants to install the older version of the software, the user will see the following error message:

# rpm-uvh foo-1.0-l.i386. RPM

foo packag foo-2.0-l(which is newer) is already installed

error: foo-1.0l-l.i 386. RPM cannot be installed

.
user can use rpm-q to query the corresponding software in the RPM database, RPM will give the name of the software package, version, release version number, for example:

# rpm-q foo

foo-2.0-l

the following is the query can use the specific parameters:
-a query the current system installed all software packages.
-f filename query includes ga file packages.
– F with the -f parameter, just input is standard input (for example the find/usr/bin | RPM – qF)
– q package name:
– q query the package with the -p parameter, just input is standard input (for example the find/MNT/cdrom/RedHat/RPMS | RPM – qQ)
here is the format of the output options:
– I displays the name of the package, description, distribution, size, date of compilation, the date of installation, developers and other information.
-l display the files contained in the software package
-s display the current status of the files contained in the software package, only two states: normal and missing
-d display the documents in the software package (such as man,info,README, etc.)
-c display the configuration files in the software package, these files generally need to be manually modified by the user after installation, for example: Sendmail. Cf, passwd, inittab etc.
if using the -v parameter can be similar to the output of the ls -l

5) in the RPM packages
users can use the RPM used to check the package has been installed, the RPM can check file size, MD5 check code, file permissions, type, and the information such as owner.
here is the parameter description:
– a simple calibration software package if the file exists
– b check package in a single file

– c check installation of all packages – d compare a source package and already installed packages

if the test through, there is no any error messages, if there is an error message, its format is as follows: the error information is one of the eight string, if it is a “. “, means there is no problem, here is the meaning of the corresponding characters: MD5 check error
5 MD5 check error
S file size error
L symbolic connection
T file modification time error
D device file error
U user name error
G group name error
M attributes (including overwrite weight and file type) error
if the user sees this information, it is best to reinstall or manually repair.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

the RPM practical skills!
1) users can install packages via FTP. If users will be able to connect on the network, want to install a new software package, you can directly use it to install to the URL:
for example: under ftp.linuxsir.com/pub/linux/redhat/RPMS/ now have this file package: foo – 1.0-1. I386 RPM, then you can use this command:

# RPM -i ftp.linuxsir.com/pub/linux/redhat/RPMS/foo-1.0-1.i386.rpm

to install, also can query!

2) if the user accidentally wushan several files, but not sure whether those documents, want to check to the whole system, in order to understand which parts may be damaged, you can use:

# RPM – Va

3) if the user meets a person not to come out of the file, want to know it belongs to the words of a software package, you can do it:

# rpb-qf /usr/X11R6/bin/xjewel

results are obtained with the following information:
xjewel-1.6-1

4) if the user gets a new RPM file, but does not know its contents; Or to find out which files a particular file package will install on your system, do this: