質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Linux

Linuxは、Unixをベースにして開発されたオペレーティングシステムです。日本では「リナックス」と呼ばれています。 主にWebサーバやDNSサーバ、イントラネットなどのサーバ用OSとして利用されています。 上位500のスーパーコンピュータの90%以上はLinuxを使用しています。 携帯端末用のプラットフォームAndroidは、Linuxカーネル上に構築されています。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

Q&A

解決済

1回答

2157閲覧

pythonとyumについて

gik

総合スコア152

Linux

Linuxは、Unixをベースにして開発されたオペレーティングシステムです。日本では「リナックス」と呼ばれています。 主にWebサーバやDNSサーバ、イントラネットなどのサーバ用OSとして利用されています。 上位500のスーパーコンピュータの90%以上はLinuxを使用しています。 携帯端末用のプラットフォームAndroidは、Linuxカーネル上に構築されています。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

0グッド

0クリップ

投稿2016/07/12 15:13

すいません。
しつもんがみっつあります
cent os7をつかっています
まずpython2.7.5をyum remove python
してpython3.4.3を入れました
この前だったか後だかわかりませんがyum updateで
読み込んだプラグイン:fastestmirror, langpacks
Repository google-chrome is listed more than once in the configuration
base | 3.6 kB 00:00
epel/x86_64/metalink | 5.2 kB 00:00
epel | 4.3 kB 00:00
extras | 3.4 kB 00:00

One of the configured repositories failed (不明),
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 repository, 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 baseurl for repo: google-chrome
のエラーがでました。

色々やってみて
ミラーの部分を

CentOS-Base.repo

The mirror system uses the connecting IP address of the client and the

update status of each mirror to pick mirrors that are updated to and

geographically close to the client. You should use this for CentOS updates

unless you are manually picking other mirrors.

If the mirrorlist= does not work for you, as a fall back you can try the

remarked out baseurl= line instead.

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://ftp.riken.jp/Linux/centos/$releasever/os/$basearch/
http://ftp.jaist.ac.jp/Linux/centos/$releasever/os/$basearch/
http://ftp.iij.ad.jp/Linux/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=http://ftp.riken.jp/Linux/centos/$releasever/updates/$basearch/
http://ftp.jaist.ac.jp/Linux/centos/$releasever/os/$basearch/
http://ftp.iij.ad.jp/Linux/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful

[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=http://ftp.riken.jp/Linux/centos/$releasever/extras/$basearch/
http://ftp.jaist.ac.jp/Linux/centos/$releasever/os/$basearch/
http://ftp.iij.ad.jp/Linux/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages

[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
baseurl=http://ftp.riken.jp/Linux/centos/$releasever/centosplus/$basearch/
http://ftp.jaist.ac.jp/Linux/centos/$releasever/os/$basearch/
http://ftp.iij.ad.jp/Linux/centos/$releasever/os/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
変えたんですが、なおりません。
python無理矢理かえたせいですか?
すいません。アドバイスお願いします

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

Python2であるpythonパッケージをremoveするときに依存関係のエラーが出ませんでしたか?

yumはPython2で作られており、Python2でしか動かなかったはずです(たしか、Python3対応するために作ったDNFと言うのに将来は移行する予定だったはず)。なので、yumを使い続ける場合は、Python2であるpythonパッケージはそのままにしておいて、別途Python3を入れないと、まともな動作は期待できなかったと思います。

ひとまず、サイトなりDVDなりからpythonパッケージをもってきて、rpmで入れてみるしか無いかと思います。または、DNFはCentOS7版もあるそうなのでそっちを試すのも一つかも知れません。

投稿2016/07/12 15:31

raccy

総合スコア21735

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

gik

2016/07/12 15:38

でました。 今からpython2を入れることは可能でしょうか? 最初から入れなおさないとだめでしょうか?
raccy

2016/07/12 21:25

今どうなっているかがわからないため、なんとも言えないです。やったことの逆の手順、 1. インストールしてしまったPython3のアンインストール 2. 削除してしまったpythonパッケージのインストール をyumを使わずに(パッケージを手動で落としてrpmコマンドでインストールなど)行ってうまくいくかどうかでしょう。
gik

2016/07/13 06:34

cent os7を再度インストールすることにしました。 ありがとうございました。 もう二度としません。 気を付けます。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問