電子書籍の厳選無料作品が豊富!

CentOS7で、httpdをインストールしようと「yum -y install httpd」というコマンドを実行したところ、画像のようなエラーが出ました。
調べてみて、yumが外に出てないことが理由かもしれないという気もするのですが、どうすれば解決できるか教えてください。
なお、ifconfigなどのコマンドも、「-bash: ifconfig: command not found」と出て、実行できません。

「CentOS7で、httpdをインストー」の質問画像

A 回答 (2件)

>Could not resolve host: mirrorlist.centos.org; Unknown error



名前解決ができない。
と言われているようです。

DNSの設定とかどうなっているのかも確認された方がよいでしょう。

まずは…ifconfigが入っていなかったらインストールメディアからインストール。
Ethernetデバイスが動作していない場合は別PCなどでドライバ探してDL、USBメモリなどで移してビルド…でしょうかね。
# ハードの情報がないのでこちらでは探せませんけど。
# /var/log/messagesでethなどで検索すると…なんか出てきますかねぇ…
# lspciとかでも見つかるかも知れませんが。

無線LANだったりするといろいろ面倒かと思われます。

最小インストールだとnet-tools入らないんですかね????
    • good
    • 1
この回答へのお礼

DNSを設定したら、つながりました。
ありがとうございました。

お礼日時:2015/01/20 22:17

画像だと潰れていたりするのでイマイチ読む気力が削がれますねぇ…。



とりあえず、rootになっているみたいですので、ネットに繋がっているのなら行けそうではありますが…
リポジトリ参照しようとしている最初の段階でミラーリストにアクセスできていないみたいですから、無理かなぁ。
ハードなどの問題でEthernetデバイスとか動作していないんでしょうかね??

>なお、ifconfigなどのコマンドも、「-bash: ifconfig: command not found」と出て、実行できません。

ネットワーク関連のツールとかインストールされていない…とか?
/sbin/ifconfigはnet-toolsパッケージに入っているようですけど、
rpm -qa の一覧でnet-toolsって出てきますか?

デバイスドライバに関しては不明ですが、パッケージのインストールだけならインストール用のメディア(CDかDVD)からパッケージを導入する。
という方法もあります。
http://tanyaolinux.blogspot.jp/2014/08/centos7-y …

ethernetのドライバをソースからビルドする場合でも上記の方法で必要なパッケージをインストールしてドライバ適用する。という回避策があります。
# カーネル更新するたびにドライバのビルド&インストールが必要という面倒なことになりますが…。

この回答への補足

申しわけありません。
文字に起こしました。

"[root@localhost ~]#yum -y install httpd
Loaded plugins: fastestmirror
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86 … error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"

One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:

1. Contact the upstream for the repository and get them to fix the problem.

2. Reconfigure the baseurl/etc. for the repositry, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).

3. Disable the repository, so yum won't use it by default. Yum will then
just ignore the repository until you permanently enable it again or use
--enablerepo for temporary usage:

yum-config-manager --disable <repoid>

4. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:

yum-config-manager --save --setopt=<repoid>. skip_if_unavailable=true

Cannot find a valid base url for repo: base/7/x86_64
[root@localhost ~]#"

言われた方法をやってみます。
ありがとうございます。

補足日時:2015/01/16 16:51
    • good
    • 0
この回答へのお礼

ありがとうございました。

お礼日時:2015/01/20 22:17

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!