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

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

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

shは、UNIX系OSのシェル操作の1つであり、最も基本的なシェルのことです。

Q&A

解決済

1回答

308閲覧

firefoxinstall.shがインストールできない

退会済みユーザー

退会済みユーザー

総合スコア0

sh

shは、UNIX系OSのシェル操作の1つであり、最も基本的なシェルのことです。

0グッド

0クリップ

投稿2018/04/09 03:08

前提・実現したいこと

firefoxinstall.shをインストールしたいが、できない。

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

./firefoxinstall.sh: line 3: GTK+: command not found ./firefoxinstall.sh: line 5: Written: command not found ./firefoxinstall.sh: line 7: http://joekiller.com: No such file or directory ./firefoxinstall.sh: line 9: http://joekiller.com/2012/06/03/install-firefox-on-amazon-linux-x86_64-compiling-gtk/: No such file or directory chmod: cannot access ‘./gtk-firefox.sh’: No such file or directory sudo: ./gtk-firefox.sh: command not found ./firefoxinstall.sh: line 33: syntax error near unexpected token `;&' ./firefoxinstall.sh: line 33: `cat << EOF > /etc/ld.so.conf.d/firefox.conf'

とエラーが出る。

該当のソースコード

firefoxinstall.shに

#!/bin/bash GTK+ and Firefox for Amazon Linux Written by Joseph Lawson 2012-06-03 http://joekiller.com http://joekiller.com/2012/06/03/install-firefox-on-amazon-linux-x86_64-compiling-gtk/ chmod 755 ./gtk-firefox.sh sudo ./gtk-firefox.sh TARGET=/usr/local function init() { export installroot=$TARGET/src export workpath=$TARGET yum –assumeyes install make libjpeg-devel libpng-devel \ libtiff-devel gcc libffi-devel gettext-devel libmpc-devel \ libstdc++46-devel xauth gcc-c++ libtool libX11-devel \ libXext-devel libXinerama-devel libXi-devel libxml2-devel \ libXrender-devel libXrandr-devel libXt dbus-glib \ libXdamage libXcomposite mkdir -p $workpath mkdir -p $installroot cd $installroot PKG_CONFIG_PATH=“$workpath/lib/pkgconfig” PATH=$workpath/bin:$PATH export PKG_CONFIG_PATH PATH bash -c “ cat << EOF > /etc/ld.so.conf.d/firefox.conf $workpath/lib $workpath/firefox EOF ldconfig ” } function finish() { cd $workpath wget -r –no-parent –reject “index.html*” -nH –cut-dirs=7 http://download.cdn.mozilla.net/pub/mozilla.org/firefox/releases/32.0/linux-x86_64/en-US/firefox-32.0.tar.bz2 tar xvf firefox* cd bin ln -s ../firefox/firefox ldconfig } function install() { wget $1 FILE=basename $1 if [ ${FILE: -3} == “.xz” ] then tar xvfJ $FILE else tar xvf $FILE fi SHORT=${FILE:0:4}* cd $SHORT ./configure –prefix=$workpath make make install ldconfig cd .. } init install ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.xz install https://www.dropbox.com/s/m605fa6jgff7kcb/freetype-2.4.9.tar.gz?dl=0 install http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.9.0.tar.gz install http://ftp.gnome.org/pub/gnome/sources/glib/2.32/glib-2.32.3.tar.xz install http://cairographics.org/releases/pixman-0.26.0.tar.gz install http://cairographics.org/releases/cairo-1.12.2.tar.xz install http://ftp.gnome.org/pub/gnome/sources/pango/1.30/pango-1.30.0.tar.xz install http://ftp.gnome.org/pub/gnome/sources/atk/2.4/atk-2.4.0.tar.xz install http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/2.26/gdk-pixbuf-2.26.1.tar.xz install http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.10.tar.xz finish adds the /usr/local/bin to your path by updating your .bashrc file. cat << EOF >> ~/.bashrc PATH=/usr/local/bin:$PATH export PATH EOF

とコードを書いて実行した。

試したこと

GTK+: command not foundやWritten: command not foundなどのエラーを調べたが解決策がわからなかった。

補足情報(FW/ツールのバージョンなど)

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

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

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

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

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

guest

回答1

0

ベストアンサー

説明文までファイルに入れてはだめです。
参考にしたページを、もう一度よく読み直してください。

投稿2018/04/09 03:23

otn

総合スコア84499

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

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

退会済みユーザー

退会済みユーザー

2018/04/09 06:53

ありがとうございます、#!/bin/bash〜chmod 755 ./gtk-firefox.shまでの間を削除したのですが、
退会済みユーザー

退会済みユーザー

2018/04/09 06:53

chmod: cannot access ‘./gtk-firefox.sh’: No such file or directory sudo: ./gtk-firefox.sh: command not found ./firefoxinstall.sh: line 25: syntax error near unexpected token `;&' ./firefoxinstall.sh: line 25: `cat << EOF > /etc/ld.so.conf.d/firefox.conf'
otn

2018/04/09 07:33 編集

> おそらく、 > http://joekiller.com > http://joekiller.com/2012/06/03/install-firefox-on-amazon-linux-x86_64-compiling-gtk/ の2行で > gtk-firefox.shファイルをダウンロードするとは思うのですが、 全然違いますよ。 https://joekiller.com/2012/06/03/install-firefox-on-amazon-linux-x86_64-compiling-gtk/ を読んでその通りにすればいいのでは? 何故書いてある通りにしないのですか?英語が理解できないと言うことでしょうか? > Here is the gtk-firefox file for your pleasure. の下にあるのが、gtk-firefox.sh です。それをコピペしてください。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問