
CentOs 6.3の事前作成テンプレートを使用してOpenVZコンテナにgitをインストールしようとしています。コマンドラインを試すと
yum install git
次のメッセージが表示されます:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: www.cubiculestudio.com
* epel: mirror.csclub.uwaterloo.ca
* extras: www.cubiculestudio.com
* rpmforge: mirror.us.leaseweb.net
* updates: www.cubiculestudio.com
Setting up Install Process
No package git available.
Error: Nothing to do
私の理解では、git パッケージは centos6 ベース リポジトリにあるはずです。 git 1.7.1-2.el6_0.1.x86_64 をダウンロードしてください。
しかし、見つかりません。EPEL と RPMForge リポジトリも有効になっていますが、それでも git パッケージが見つかりません。
yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: www.cubiculestudio.com
* epel: mirror.csclub.uwaterloo.ca
* extras: www.cubiculestudio.com
* rpmforge: mirror.us.leaseweb.net
* updates: www.cubiculestudio.com
repo id repo name status
base CentOS-6 - Base 4,776
epel Extra Packages for Enterprise Linux 6 - i386 6,523
extras CentOS-6 - Extras 4
rpmforge RHEL 6 - RPMforge.net - dag 4,501
updates CentOS-6 - Updates 596
vz-base vz-base 3
vz-updates vz-updates 0
repolist: 16,403
最も奇妙なことは、私の OpenVZ サーバーが CentOs 6.3 上で実行されているにもかかわらず、問題なく git をインストールできたことです。
パッケージが見つからない理由を教えていただけますか?
よろしくお願いします。
答え1
VPS プロバイダーはデフォルトの CentOS リポジトリを無効にし、実際にはベース システム パッケージへのアクセスを提供しないリポジトリに置き換えました。これは、OpenVZ 構成の一般的な問題のようです。
私は次のように対処しました:
/etc/yum.repos.d
VZ リポジトリを参照しているファイルをすべて削除します。最新の RPM のクリーン コピーを取得し
centos-release
、それを既存のものに上書きインストールします。rpm -Uvh --replacefiles --replacepkgs centos-release-6*.rpm
長期的な解決策としては、おそらく OpenVZ の使用をやめることでしょう。適切な構成を実行できるパブリック OpenVZ プロバイダーをまだ 1 つも見つけていません。