Why not login to Qiita and try out its useful features?

We'll deliver articles that match you.

You can read useful information later.

0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

CentOS 7にNVIDIAドライバをインストールしようとしてgccのバージョンでハマったお話

Last updated at Posted at 2023-03-09

備忘録

結論

旧バージョンのgccをリネームで退避させ、新バージョンへのシンボリックリンクを貼ることで解決した。

# mv /usr/bin/gcc /usr/bin/gcc.bak &&  ln -s /usr/local/bin/gcc /usr/bin/gcc
# mv /usr/bin/gcc-ar /usr/bin/gcc-ar.bak &&  ln -s /usr/local/bin/gcc-ar /usr/bin/gcc-ar
# mv /usr/bin/gcc-ranlib /usr/bin/gcc-ranlib.bak &&  ln -s /usr/local/bin/gcc-ranlib /usr/bin/gcc-ranlib

何があったのか

NVIDIAドライバをインストール中、centos 7にデフォルトでインストールされているgcc 4.2.2が古すぎてエラーになってしまった。
ソースコードからgcc 12.2.0をインストールし、gcc -vでバージョンが上がっていることを確認したにもかかわらずドライバのインストールスクリプトはgcc 4.2.2を呼び出して同じエラーを吐き出すだけだった。

どうしたのか

結論の通り、デフォルトで入っている/usr/bin以下のgcc関連実行ファイルを退避、/usr/local/bin以下にある新しいgccへのシンボリックリンクを貼った。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up

Qiita Conference 2025 will be held!: 4/23(wed) - 4/25(Fri)

Qiita Conference is the largest tech conference in Qiita!

Keynote Speaker

ymrl、Masanobu Naruse, Takeshi Kano, Junichi Ito, uhyo, Hiroshi Tokumaru, MinoDriven, Minorun, Hiroyuki Sakuraba, tenntenn, drken, konifar

View event details
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?