• ベストアンサー
※ ChatGPTを利用し、要約された質問です(原文:コンパイルの途中で、以下のようなメッセージがでました。)

コンパイルエラー時のメッセージの対処方法

このQ&Aのポイント
  • コンパイルの途中でエラーメッセージが表示される場合、対処方法はいくつかあります。まず、インストールされたライブラリの場所を確認し、リンクする必要がある場合はライブラリのフルパスを指定するか、リンク時に`-LLIBDIR'フラグを使用する必要があります。
  • また、実行時にライブラリディレクトリを`LD_LIBRARY_PATH'に追加するか、リンカーフラグとして`-RLIBDIR'を使用する必要があります。
  • 共有ライブラリに関する詳細な情報は、オペレーティングシステムのドキュメント(例:ld(1)やld.so(8)のマニュアルページ)を参照してください。

質問者が選んだベストアンサー

  • ベストアンサー
  • entree
  • ベストアンサー率55% (405/735)
回答No.1

プログラムを実行する際に以下のようなことをする必要があるというようなメッセージで、特にエラーを示すものではないです。 - 環境変数 LD_LIBRARY_PATH を設定する (ex.) LD_LIBRARY_PATH=/usr/local/lib - リンク時に -L で指定したディレクトリを -R でも設定する (ex.) -L/usr/local/lib --> -L/usr/local/lib -R/usr/local/lib

fwga6006
質問者

お礼

早速のご返答、ありがとうございました。 なにとぞ、これからもよろしくお願いします

全文を見る
すると、全ての回答が全文表示されます。

関連するQ&A

  • Radiusのmake install時に表示されるエラーの解決策を教えて頂けないでしょうか?

    CentOS5.3環境(64ビット版)にfreeRadius1.1.7をインストールする際(make install時)に以下の警告のようなメッセージが表示されます。解決策を教えていただけないでしょうか?(自分なりに和訳したところ、/usr/local/freeradius/libへのパスを指定しなさい的な指示と思ったのですが、具体的な解決策がわかりません。) ---------------------------------------------------------------------- Libraries have been installed in: /usr/local/freeradius/lib If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ----------------------------------------------------------------------

  • Apache2 インストール後モジュール追加(proxy, proxy_ajp)

    標題の件でご教授ください。 現象としては、Apache2にモジュール(mod_proxy.soおよびmod_proxy_ajp.so)追加しようとして、mod_*.soが作成されず困っております。 なお、インストール時、configureにオプション"--enable-proxy" "--enable-proxy-ajp"を付加する方法は知っていますが、インストール後にモジュールを追加する方法を教えていただきたいです。 ■環境 OS: Red Hat Enterprise Linux 5.3 ■参考ページ 「Enjoi Blog」~apache2 にモジュールを追加する http://blog.enjoitech.jp/article/131 ■実行手順(mod_proxy.soの場合の例) 1.コンパイル。 [root@localhost proxy]# /usr/local/apache2/bin/apxs -c mod_proxy.c proxy_util.c /usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer-pic -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread -I/usr/local/apache2/include -I/usr/local/apache2/include -I/usr/local/apache2/include -c -o mod_proxy.lo mod_proxy.c && touch mod_proxy.slo /usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer-pic -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread -I/usr/local/apache2/include -I/usr/local/apache2/include -I/usr/local/apache2/include -c -o proxy_util.lo proxy_util.c && touch proxy_util.slo /usr/local/apache2/build/libtool --silent --mode=link gcc -o mod_proxy.la -rpath /usr/local/apache2/modules -module -avoid-version proxy_util.lo mod_proxy.lo 2.オブジェクトが作成されていることを確認。 [root@localhost proxy]# ls -la mod_proxy.* -rw-r--r-- 1 root root 88327 2月 1 2009 mod_proxy.c -rw-r--r-- 1 root root 4942 1月 11 2007 mod_proxy.dsp -rw-r--r-- 1 root root 32152 11月 12 2008 mod_proxy.h -rw-r--r-- 1 root root 758 10月 23 21:42 mod_proxy.la -rw-r--r-- 1 root root 303 10月 23 21:42 mod_proxy.lo -rw-r--r-- 1 root root 180184 10月 23 21:42 mod_proxy.o -rw-r--r-- 1 root root 0 10月 23 21:42 mod_proxy.slo [root@localhost proxy]# ls -la proxy_util.* -rw-r--r-- 1 root root 81086 7月 3 20:57 proxy_util.c -rw-r--r-- 1 root root 305 10月 23 21:42 proxy_util.lo -rw-r--r-- 1 root root 148440 10月 23 21:42 proxy_util.o -rw-r--r-- 1 root root 0 10月 23 21:42 proxy_util.slo 3.インストール→失敗。 [root@localhost proxy]# /usr/local/apache2/bin/apxs -ian proxy mod_proxy.la /usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' mod_proxy.la /usr/local/apache2/modules /usr/local/apache2/build/libtool --mode=install cp mod_proxy.la /usr/local/apache2/modules/ cp .libs/mod_proxy.lai /usr/local/apache2/modules/mod_proxy.la cp .libs/mod_proxy.a /usr/local/apache2/modules/mod_proxy.a chmod 644 /usr/local/apache2/modules/mod_proxy.a ranlib /usr/local/apache2/modules/mod_proxy.a PATH="$PATH:/sbin" ldconfig -n /usr/local/apache2/modules ---------------------------------------------------------------------- Libraries have been installed in: /usr/local/apache2/modules If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- Warning! dlname not found in /usr/local/apache2/modules/mod_proxy.la. Assuming installing a .so rather than a libtool archive. chmod 755 /usr/local/apache2/modules/mod_proxy.so chmod: cannot access `/usr/local/apache2/modules/mod_proxy.so': そのようなファイルやディレクトリはありません apxs:Error: Command failed with rc=65536 以上、よろしくお願いいたします。

  • gccコンパイル時のエラーメッセージを説明してください。

    下に書いてあるプログラムをコンパイルしたら、更にその下に書いてあるようなエラーメッセージがでました。何を直せといっているのかいまいちよく分からないので解説してください。 そもそもgccのコンパイルに失敗しているってことなのかなとも思いましたが、gccはネットからゲットしてきたパッケージなので、なんとも確証がもてません。 プログラム #include<string.h> char * Basename(char *pathname) { char *cp; if(cp = strrchr(pathname,'/')) return cp + 1; return pathname; } メッセージ Undefined first referenced symbol in file main /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/crt1.o ld: fatal: Symbol referencing errors. No output written to a.out collect2: ld returned 1 exit status

  • GTK+2.2.0のインストールエラー

    gtk+-2.2.0をインストールしようとしたのですが、インストールだけにエラーが出て完了しません。以下にログを書きます。(エラーらしきところのみにします途中略してます) ーーーーーここからーーーーー Libraries have been installed in: /opt/valox//lib/gtk-2.0/2.4.0/immodules If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ーーー略ーーー Cannot load module /opt/valox//lib/gtk-2.0/2.4.0/immodules/im-ipa.so: /opt/valox//lib/gtk-2.0/2.4.0/immodules/im-ipa.so: cannot open shared object file: No such file or directory /opt/valox//lib/gtk-2.0/2.4.0/immodules/im-ipa.so does not export GTK+ IM module API: /opt/valox//lib/gtk-2.0/2.4.0/immodules/im-ipa.so: cannot open shared object file: No such file or directory Cannot load module /opt/valox//lib/gtk-2.0/2.4.0/immodules/im-thai-broken.so: /opt/valox//lib/gtk-2.0/2.4.0/immodules/im-thai-broken.so: cannot open shared object file: No such file or directory /opt/valox//lib/gtk-2.0/2.4.0/immodules/im-thai-broken.so does not export GTK+ IM module API: /opt/valox//lib/gtk-2.0/2.4.0/immodules/im-thai-broken.so: cannot open shared object file: No such file or directory Cannot load module /opt/valox//lib/gtk-2.0/2.4.0/immodules/im-ti-er.so: /opt/valox//lib/gtk-2.0/2.4.0/immodules/im-ti-er.so: cannot open shared object file: No such file or directory /opt/valox//lib/gtk-2.0/2.4.0/immodules/im-ti-er.so does not export GTK+ IM module API: /opt/valox//lib/gtk-2.0/2.4.0/immodules/im-ti-er.so: cannot open shared object file: No such file or directory Cannot load module /opt/valox//lib/gtk-2.0/2.4.0/immodules/im-ti-et.so: /opt/valox//lib/gtk-2.0/2.4.0/immodules/im-ti-et.so: cannot open shared object file: No such file or directory /opt/valox//lib/gtk-2.0/2.4.0/immodules/im-ti-et.so does not export GTK+ IM module API: /opt/valox//lib/gtk-2.0/2.4.0/immodules/im-ti-et.so: cannot open shared object file: No such file or directory Cannot load module /opt/valox//lib/gtk-2.0/2.4.0/immodules/im-viqr.so: /opt/valox//lib/gtk-2.0/2.4.0/immodules/im-viqr.so: cannot open shared object file: No such file or directory /opt/valox//lib/gtk-2.0/2.4.0/immodules/im-viqr.so does not export GTK+ IM module API: /opt/valox//lib/gtk-2.0/2.4.0/immodules/im-viqr.so: cannot open shared object file: No such file or directory make[4]: *** [install-data-hook] エラー 1 make[4]: 出ます ディレクトリ `/root/GTK2/gtk+-2.8.17/modules/input' make[3]: *** [install-data-am] エラー 2 make[3]: 出ます ディレクトリ `/root/GTK2/gtk+-2.8.17/modules/input' make[2]: *** [install-am] エラー 2 make[2]: 出ます ディレクトリ `/root/GTK2/gtk+-2.8.17/modules/input' make[1]: *** [install-recursive] エラー 1 make[1]: 出ます ディレクトリ `/root/GTK2/gtk+-2.8.17/modules' make: *** [install-recursive] エラー 1 ーーーーーここまでーーーーー 以上です。 エラーログを見ていると、何かのソフトのライブラリがインストールされていないのかと思い、 gtk+-devel gtk2+-devel を、インストールしましたが、変化ありませんでした。 CPPFLAGS="-I/opt/valox/include" LDFLAGS="-L/opt/valox/lib" PKG_CONFIG_PATH="/opt/valox/lib/pkgconfig" export CPPFLAGS LDFLAGS PKG_CONFIG_PATH LD_LIBRARY_PATH="/opt/valox/lib" PATH="/opt/valox/bin:$PATH" export LD_LIBRARY_PATH PATH を実行してから ./configure && make && checkinstall で、エラーが出ます。 何が足りないのかさっぱりです。エラーの意味もわかっていません。こんな状態ですがどなたか、解決法を、ご教授願えませんでしょうか。お願いいたします。 今回のことは、私は素人なので、できるだけ具体的に指示して下さい。箇条書きのような形式でもかまいません。よろしくお願いします。 補遺:環境は、redhat9 kernel-2.4.30古いのを使っているのは、PCが古いのでスペック上を考慮したものです。

  • 以下の英文を訳して下さい。

    In November 1915 U-38 caused a diplomatic incident when she sank the Italian steamer Ancona while sailing under the Austrian flag, and the loss of 40 American citizens caused the "sinking without warning" policy to be abandoned until the resumption of unrestricted submarine warfare in 1917. A similar "false flag" incident in March 1916 was an influence on Italy's decision to declare war on Germany in August 1916.

  • 以下の文の和訳をお願いします

    I will tell you all about it after I go! Hopefully my husband comes with me because he Did not come with me to Ireland and Scotland, I live in Ketcikan during the summers still and I live in Kentucky the rest of the year.

  • BurnInTest for Linux

    Red Hat Enterprise Linux 6.1 (x86_64)でPassmark’s BurnInTest for Linuxを使用したいのですが うまく動作しません。 下記のエラーが発生します。 ------------------------------------------------------------------ 64-bit OS detected, launching ./64bit/bit_gui_x64 Missing Library: libQtWebKit.so.4 Missing libraries detected! To use the GUI version of BurnInTest you will need to install the above libraries using your prefered package manager before running BurnInTest A command line version of BurnInTest that requires less libraries is also available in the 32bit and 64bit directories. ------------------------------------------------------------------ qt-everywhere-opensource-src-4.7.4をインストールしてみましたがダメでした。 よろしくお願いします。(インターネットには接続できない環境です)

  • 和訳が分かりません。

    , but none of these are exactly "plug and play," so factor in the time and/or the cost required to have it installed when you consider the cost. このfactor in the time ってどうやって訳すのでしょうか? 全文は下記です。 The Nest and the Ecobee are designed so you can install them yourself if you're willing to tackle the project, but none of these are exactly "plug and play," so factor in the time and/or the cost required to have it installed when you consider the cost.

  • centOS5.6にnetatalkをインストール

    いつもお世話になっております。 macのlioneOSだと、Timemachineを使うのにnetatalkで通信をしないといけないそうなので linuxの知識も無く、下記URLを参考にしました http://d.hatena.ne.jp/paraches/20110424 一応BerkeleyDBのmake,installまで成功してnetatalkのインストールを行おうとして、 下記コマンドを入力して ./configure --enable-redhat --with-bdb=/usr/local/BerkeleyDB.5.1 みた所下記エラーが表示されました Make sure you have the required Berkeley DB libraries AND headers installed. You can download the latest version from http://www.sleepycat.com. If you have installed BDB in a non standard location use the --with-bdb=/path/to/bdb configure option and make sure your linker is configured to check for libraries there. configure: error: Berkeley DB library required but not found! やはりその後、makeしてみても make: *** ターゲットが指定されておらず, makefile も見つかりません. 中止. と表示されmake,installできませんでした。 何故でしょうか。。。 ご教授お願いします。

  • 以下の英文を日本語に翻訳して下さいますか?

    Missions: Please refer to CHAPTER 5. Sorry to be DIRECT. I’m going to REPORT you when doing your translation. Mission 1→ Be sure to use both direct and reported speech in your assignment. I left both in the Japanese version, so if you just translate the sentences the way they are written, you will use both.