
標準の Lua を削除して独自の Lua を構築しようとしたので、次のことを試しました。
yum remove lua
しかし、パッケージへの依存関係が多すぎて削除できないため、代わりに rpm を使用しました。
rpm -r --nodeps --force lua
Luaが削除されました。その後、自分でビルドしました。しかし、yumはクラッシュし、yumを実行するたびに(yum installでもyum listでも、単にyumでも)、
error:There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
liblua-5.1.so: cannot open shared object file: No such file or directory
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.7.3 (default, Aug 9 2012, 17:23:57)
[GCC 4.7.1 20120720 (Red Hat 4.7.1-5)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
実行できないため、lua を再インストールすることすらできません。rpm
クラッシュもします:
rpm: error while loading shared libraries: liblua-5.1.so: cannot open shared object file: No such file or directory
liblua-5.1.so のバージョンを持っていますが、/usr/lib と /usr/local/lib にシンボリック リンクを配置しようとしましたが、まだこのエラーが発生します。助けてください...再インストールしたくありません。
答え1
yum
特定のバージョンによって異なるようですルアライブラリ共有オブジェクト ファイル (liblua-5.1.so)。独自のバージョンのライブラリをコンパイルするときに使用したコンパイル フラグに互換性がないようです。
したがって、アーキテクチャ(uname -m
)を決定し、luaをダウンロードする必要があります686 さんまたは64ビットFedora からパッケージをダウンロードしてインストールし、正常に動作する状態にrpm
戻します。yum
使用できない場合はrpm
、Fedora ライブCD/ライブUSBchroot
インストールして修復を試みます。ここにいくつかありますガイドライン:
Fedora / がどのパーティションにあるか確認する
sudo -i
blkid
Fedoraパーティションをマウントする
arch="i686"
mntDir="/mnt"
mount /dev/sdX# "$mntDir"
rpm -i lua-5.1.4-12.fc19.${arch}.rpm --prefix "$mntDir"
インストールにchrootする
mount -t proc proc "${mntDir}/proc/"
mount -t sysfs sys "${mntDir}/sys/"
mount -o bind /dev "${mntDir}/dev/"
mount -t devpts pts "${mntDir}/dev/pts"
chroot "$mntDir" /bin/bash
デバッグインストール
yum --help
答え2
私も同じ問題に遭遇しました。私のシステムは CentOS 6 です。
解決:
- yum コマンドの問題がない別の CentOS 6 システムを見つけます。
- がどこにあるか調べます
liblua-5.1.so
。
$ whereis liblua-5.1.so
$ liblua-5.1: /usr/lib64/liblua-5.1.so
/usr/lib64/liblua-5.1.so
問題のあるシステムに同じパスをコピーします/usr/lib64/liblua-5.1.so