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

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

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

cURLはHTTP, FTPやTelnetなど複数のプロトコルを用いてデータを転送するライブラリとコマンドラインツールを提供します。

GCC

GCCはGNU Compiler Collectionの略です。LinuxのC言語コンパイラのデファクトスタンダードであり、数多くの他言語やプラットフォームサポートもします。

Linux

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

Q&A

1回答

3837閲覧

homebrewでgccをインストールする際にエラーが発生する

Nalmira

総合スコア0

cURL

cURLはHTTP, FTPやTelnetなど複数のプロトコルを用いてデータを転送するライブラリとコマンドラインツールを提供します。

GCC

GCCはGNU Compiler Collectionの略です。LinuxのC言語コンパイラのデファクトスタンダードであり、数多くの他言語やプラットフォームサポートもします。

Linux

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

0グッド

0クリップ

投稿2021/05/13 21:18

編集2022/01/12 10:55

前提・実現したいこと

初心者です。Xサーバーにhomebrewでcurlをインストールするときにエラーが発生しました。
gccをインストールするところでldがcrti.oというリロケータブルオブジェクトを探す際に見つからないためにエラーが起きているようです。
LIBRARY_PATHは.linuxbrew/libになっていて、そこにはcrti.oのシンボリックリンクがあり、それは.linuxbrew/Cellar/glibc/2.23/lib/crti.oにきちんとリンクされています。
一体なぜこのようなエラーが起きているのかわかりません。どの部分を修正すべきでしょうか。ご教授いただけると幸いです。

発生している問題・エラーメッセージ

==> Installing curl dependency: gcc ==> ../configure --prefix=/home/ユーザー名/.linuxbrew/Cellar/gcc/11.1.0 --libdir=/home/wユーザー名/.linuxbrew/Cellar/gcc/11.1.0/lib/gcc/11 --disable-nls ==> make Last 15 lines from /home/ユーザー名/.cache/Homebrew/Logs/gcc/02.make: # @multilib_flags@ is still needed because this may use # /tmp/gcc-20210514-66762-xs0qo4/gcc-11.1.0/build/./gcc/xgcc -B/tmp/gcc-20210514-66762-xs0qo4/gcc-11.1.0/build/./gcc/ -B/home/ユーザー名/.linuxbrew/Cellar/gcc/11.1.0/x86_64-pc-linux-gnu/bin/ -B/home/ユーザー名/.linuxbrew/Cellar/gcc/11.1.0/x86_64-pc-linux-gnu/lib/ -isystem /home/ユーザー名/.linuxbrew/Cellar/gcc/11.1.0/x86_64-pc-linux-gnu/include -isystem /home/ユーザー名/.linuxbrew/Cellar/gcc/11.1.0/x86_64-pc-linux-gnu/sys-include -fno-checking and -O2 -g -O2 -DIN_GCC -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fpic -mlong-double-80 -DUSE_ELF_SYMVER -fcf-protection -mshstk -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector directly. # @multilib_dir@ is not really necessary, but sometimes it has # more uses than just a directory name. /bin/sh ../../../libgcc/../mkinstalldirs . /tmp/gcc-20210514-66762-xs0qo4/gcc-11.1.0/build/./gcc/xgcc -B/tmp/gcc-20210514-66762-xs0qo4/gcc-11.1.0/build/./gcc/ -B/home/ユーザー名/.linuxbrew/Cellar/gcc/11.1.0/x86_64-pc-linux-gnu/bin/ -B/home/ユーザー名/.linuxbrew/Cellar/gcc/11.1.0/x86_64-pc-linux-gnu/lib/ -isystem /home/ユーザー名/.linuxbrew/Cellar/gcc/11.1.0/x86_64-pc-linux-gnu/include -isystem /home/ユーザー名/.linuxbrew/Cellar/gcc/11.1.0/x86_64-pc-linux-gnu/sys-include -fno-checking -O2 -g -O2 -DIN_GCC -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fpic -mlong-double-80 -DUSE_ELF_SYMVER -fcf-protection -mshstk -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc.map -o ./libgcc_s.so.1.tmp -g -O2 -B./ _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _mulhc3_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _divhc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _bswapsi2_s.o _bswapdi2_s.o _clrsbsi2_s.o _clrsbdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _divdi3_s.o _moddi3_s.o _divmoddi4_s.o _udivdi3_s.o _umoddi3_s.o _udivmoddi4_s.o _udiv_w_sdiv_s.o cpuinfo_s.o sfp-exceptions_s.o addtf3_s.o divtf3_s.o multf3_s.o negtf2_s.o subtf3_s.o unordtf2_s.o fixtfsi_s.o fixunstfsi_s.o floatsitf_s.o floatunsitf_s.o fixtfdi_s.o fixunstfdi_s.o floatditf_s.o floatunditf_s.o fixtfti_s.o fixunstfti_s.o floattitf_s.o floatuntitf_s.o extendsftf2_s.o extenddftf2_s.o extendxftf2_s.o trunctfsf2_s.o trunctfdf2_s.o trunctfxf2_s.o getf2_s.o letf2_s.o eqtf2_s.o _divtc3_s.o _multc3_s.o _powitf2_s.o enable-execute-stack_s.o unwind-dw2_s.o unwind-dw2-fde-dip_s.o unwind-sjlj_s.o unwind-c_s.o emutls_s.o libgcc.a -lc && rm -f ./libgcc_s.so && if [ -f ./libgcc_s.so.1 ]; then mv -f ./libgcc_s.so.1 ./libgcc_s.so.1.backup; else true; fi && mv ./libgcc_s.so.1.tmp ./libgcc_s.so.1 && (echo "/* GNU ld script"; echo " Use the shared library, but some functions are only in"; echo " the static library. */"; echo "GROUP ( libgcc_s.so.1 -lgcc )" ) > ./libgcc_s.so ld: cannot find crti.o: No such file or directory collect2: error: ld returned 1 exit status make[3]: *** [libgcc_s.so] Error 1 make[3]: Leaving directory `/tmp/gcc-20210514-66762-xs0qo4/gcc-11.1.0/build/x86_64-pc-linux-gnu/libgcc' make[2]: *** [all-stage1-target-libgcc] Error 2 make[2]: Leaving directory `/tmp/gcc-20210514-66762-xs0qo4/gcc-11.1.0/build' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/tmp/gcc-20210514-66762-xs0qo4/gcc-11.1.0/build' make: *** [all] Error 2

###試したこと

$ find -name crti.o ./.linuxbrew/lib/crti.o ./.linuxbrew/Cellar/glibc/2.23/lib/crti.o ./.linuxbrew/Cellar/gcc@5/5.5.0_6/lib/gcc/5/gcc/x86_64-unknown-linux-gnu/5.5.0/crti.o $ locate crti.o /usr/lib64/crti.o $ ls -l ~/.linuxbrew/lib/crti.o lrwxrwxrwx 1 ユーザー名 members 31 5月 15 00:52 /home/ユーザー名/.linuxbrew/lib/crti.o -> ../Cellar/glibc/2.23/lib/crti.o

####追記

$ brew --config Error: Please update your system curl. Minimum required version: 7.41.0 Your curl version: 7.29.0 Your curl executable: /usr/bin/curl Error: Please update your system Git. Minimum required version: 2.7.0 Your Git version: 1.8.3.1 Your Git executable: /usr/bin/git HOMEBREW_VERSION: >=2.5.0 (shallow or no git repository) ORIGIN: https://github.com/Homebrew/brew HEAD: 7c68b1738b3dce2885d0146f327eaaf96b6d0029 Last commit: 2 days ago Core tap ORIGIN: https://github.com/Homebrew/linuxbrew-core Core tap HEAD: e280d0a1a8e6baae7461513ec09fc855c53d531e Core tap last commit: 28 hours ago Core tap branch: master HOMEBREW_PREFIX: /home/ユーザー名/.linuxbrew HOMEBREW_REPOSITORY: /home/ユーザー名/.linuxbrew/Homebrew HOMEBREW_CELLAR: /home/ユーザー名/.linuxbrew/Cellar HOMEBREW_CASK_OPTS: [] HOMEBREW_MAKE_JOBS: 96 Homebrew Ruby: 2.6.3 => /home/ユーザー名/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/bin/ruby CPU: 96-core 64-bit zen Clang: N/A Git: 1.8.3.1 => /bin/git Curl: 7.29.0 => /usr/bin/curl Kernel: Linux 4.15.0-142-generic x86_64 GNU/Linux OS: CentOS Linux release 7.8.2003 (Core) Host glibc: 2.17 /usr/bin/gcc: 4.8.5 /usr/bin/ruby: 2.0.0 glibc: 2.23 gcc@5: 5.5.0_6 xorg: N/A

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

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

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

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

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

guest

回答1

0

ubuntuのhomebrew(linuxbrew)にcurlをインストールしてみましたが、gccのインストールなど
始まりませんでしたね。
gccは元々ubuntuにインストールされています。(/usr/bin/gcc)
(LIBRARY_PATHなども設定していません。)

ユーザ名@ubuntu:~$ type -a curl gcc curl は /home/linuxbrew/.linuxbrew/bin/curl です curl は /usr/bin/curl です gcc は /usr/bin/gcc です

投稿2021/05/15 06:05

technocore

総合スコア7200

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

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

Nalmira

2021/05/15 16:11

configについて追記しました。当方のサーバーにもgccは入っているんですが、バージョンが古いためにbrew側で新しいものを入れているようです。 curlのバージョンが古いという警告がうるさいのでアップデートしようとしたんですが、諦めるしかないのでしょうか。
technocore

2021/05/15 16:51

Error: Please update your system Git. Minimum required version: 2.7.0 Your Git version: 1.8.3.1 Your Git executable: /usr/bin/git Gitが古い、とありますが何か行動しましたか? エラーメッセージ読んでいますか?丸投げですか?
Nalmira

2021/05/16 08:21

説明不足で申し訳ありません。そもそもgitはcurlに依存しているので、結局curlのインストールでエラーを吐くのです。なので、gitもインストールできません。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

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

ただいまの回答率
85.50%

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

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

質問する

関連した質問