• 締切済み

sedによる書き換え。または別の方法

dev_nullの回答

  • dev_null
  • ベストアンサー率67% (37/55)
回答No.3

設定ファイルの差分をとってパッチを作成。元のファイルにパッチを適用ではだめですか。 ただし、ファイル数が多いとパッチの作成が面倒ですが。

関連するQ&A

  • yumが使えなくなった

    Fedora 7をLive CDからインストールした後、/etc/yum.repos.d/fedora.repoを以下のように変更してyumを使うと、エラーが出てパッケージのインストール等ができない状況になりました。 同じエラーメッセージでいろいろ調べてみたのですが、リポジトリへのアクセスが集中しているのが原因というのが多いようでした。 しかし、時間を置いて、朝、昼、夜とyumを実行してみても同じエラーが出ますし、他のfedora 7のマシンでは正しくyumでパッケージの管理ができました。 おそらく設定等が原因かと思いますが、原因と対処について教えていただけないでしょうか。よろしくお願いします。 エラー内容:------------------------------------------------------- Loading "installonlyn" plugin Setting up Install Process Parsing package install arguments http://ftp.iij.ad.jp/pub/linux/fedora/releases/7/Everything/i386/os/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-2, '\xe5\x90\x8d\xe5\x89\x8d\xe3\x81\xbe\xe3\x81\x9f\xe3\x81\xaf\xe3\x82\xb5\xe3\x83\xbc\xe3\x83\x93\xe3\x82\xb9\xe3\x81\x8c\xe4\xb8\x8d\xe6\x98\x8e\xe3\x81\xa7\xe3\x81\x99')> Trying other mirror. http://ftp.riken.jp/Linux/fedora/releases/7/Everything/i386/os/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-2, '\xe5\x90\x8d\xe5\x89\x8d\xe3\x81\xbe\xe3\x81\x9f\xe3\x81\xaf\xe3\x82\xb5\xe3\x83\xbc\xe3\x83\x93\xe3\x82\xb9\xe3\x81\x8c\xe4\xb8\x8d\xe6\x98\x8e\xe3\x81\xa7\xe3\x81\x99')> Trying other mirror. http://ftp.jaist.ac.jp/pub/Linux/Fedora/releases/7/Everything/i386/os/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-2, '\xe5\x90\x8d\xe5\x89\x8d\xe3\x81\xbe\xe3\x81\x9f\xe3\x81\xaf\xe3\x82\xb5\xe3\x83\xbc\xe3\x83\x93\xe3\x82\xb9\xe3\x81\x8c\xe4\xb8\x8d\xe6\x98\x8e\xe3\x81\xa7\xe3\x81\x99')> Trying other mirror. Error: Cannot open/read repomd.xml file for repository: fedora fedora.repo ------------------------------------------------------ [fedora] name=Fedora $releasever - $basearch #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/ baseurl=http://ftp.jaist.ac.jp/pub/Linux/Fedora/releases/7/Everything/i386/os http://ftp.iij.ad.jp/pub/linux/fedora/releases/7/Everything/i386/os http://ftp.riken.jp/Linux/fedora/releases/7/Everything/i386/os #mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY [fedora-debuginfo] name=Fedora $releasever - $basearch - Debug #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/ mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-$releasever&arch=$basearch enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY [fedora-source] name=Fedora $releasever - Source #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/ mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-source-$releasever&arch=$basearch enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

  • linuxのリポジトリ

    linuxのリポジトリの探し方がいまいち理解できません。。。 例えば、ZABBIXをインストールする時は、ZABBIXのリポジトリを rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm とインストールすると思いますが、ブラウザからURLをたどっていき http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64までは、ブラウザでもみることができるのですが、zabbix-release-2.4-1.el6.noarch.rpmというものは、どこにも存在してません。 zabbix-2.4.0-1.el6.x86_64.rpm zabbix-agent-2.4.0-1.el6.x86_64.rpm zabbix-java-gateway-2.4.0-1.el6.x86_64.rpm と色々ありますが、zabbix-release-2.4-1.el6.noarch.rpmはどこにもないですよね?? http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm ってどうやってわかるのでしょうか?? どなたかご教授下さい。

  • amavisd-newインストールエラー

    こんにちは、 http://fedorasrv.com/postfix-clamav-spamassassin.shtml を参考に、 OS:FEDORA4 Postfix,Dovecot,Clam AntiVirus でメールサーバーを立てているのですが、 yum -y install amavisd-new のインストール時に、 public key not available for perl-XML-SAX-0.12-7.noarch.rpm Retrieving GPG key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora と出てインストールが出来ません。 何が問題なのでしょうか。

  • Linuxのブラウザで動画をみたいんですが...

    Linuxのブラウザで動画をみたいんですが... Linux(Fedora13)のブラウザ(Firefox)で動画を見るにはAdobe Flash Playerが必要らしいですが、/etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linuxの GPGキーが見当たりません。 DVD ISO イメージのFedora-13-i386-DVD.isoを展開しても見当たりませんし、RPM-GPG-KEY-adobe-linuxをインポートしたいんですがどうすればいいですか?

  • CentOSでyumアップデートできなくなりました。

    こんにちは、CentOS 4.5を使っております。 ・ネットワーク環境上、Proxy不要 ・yum-plugin-fastestmirrorをインストール ・/etc/yum.repos.d/CentOS-Base.repo↓ [base] name=CentOS-$releasever - Base mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&cc=JP #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 priority=1 protect=1 #released updates [update] name=CentOS-$releasever - Updates mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&cc=JP #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 priority=1 protect=1 #packages used/produced in the build but not released [addons] name=CentOS-$releasever - Addons mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons&cc=JP #baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 priority=1 protect=1 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&cc=JP #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 priority=1 protect=1 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&cc=JP #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ gpgcheck=1 ・/etc/yum.conf↓ [main] cachedir=/var/cache/yum debuglevel=2 logfile=/var/log/yum.log pkgpolicy=newest installonlypkgs=kernel kernel-smp kernel-devel kernel-smp-devel kernel-largesmp kernel-largesmp-devel kernel-hugemem kernel-hugemem-devel distroverpkg=centos-release tolerant=1 exactarch=1 retries=20 obsoletes=1 gpgcheck=1 plugins=1 5007/08/28からすべてのレポジトリに接続できなくなっています。 baseurlをftp.riken.jpにしても接続できませんでした。 どなたか解決策をご教授ください、お願いいたします。

  • yumが使えなくなってしまいました。

    CentOSを使っています。 特に設定ファイルを編集した覚えはなく、 調べてはみたのですが分からなくて困っています。 できれば教えていただけないでしょうか? [root@localhost yum.repos.d]# yum install yum Setting up Install Process Setting up repositories Cannot find a valid baseurl for repo: update Error: Cannot find a valid baseurl for repo: update [root@localhost yum.repos.d]# less CentOS-Base.repo #released updates [update] name=CentOS-$releasever - Updates mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

  • CentOS5.2へPHP5.2系がインストールできません。

    その1) あるサイトで # rpm --import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka 取得し、 # vi /etc/yum.repos.d/utterramblings.repo [utterramblings] name=Jason's Utter Ramblings Repo baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/ enabled=1 gpgcheck=1 gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka と記入し保存しました。 最後に # yum update php or yum --enablerepo=utterramblings update php 上記を指定しましたが アップデート(インストール)できてませんでした。 その2) # cd php-5.2.x # ./configure --with-apxs2=/usr/local/apache2/bin/apxs ↑/usr/local/apache2/bin/apxsこのフォルダーないのですが 勝手に作ってよろしいの? (略) # make←このメイクもできませんでした。 ターゲットを指定してください?ターゲットってなに 何をターゲットにしたらいいの? ;;ということで(その1)(その2)のやり方でできなければどうすれば?どなたかお教えください。よろしくお願いいたします。

  • yum -y コマンド

    Fedora linuxでpostfixをインストールしようと 「yum -y install postfix」ってコマンドを入れると Gathering header information file(s) from server(s) Server: Fedora Core 1 - i386 - Base retrygrab() failed for: http://fedora.redhat.com/releases/fedora-core-1/headers/header.info Executing failover method failover: out of servers to try Error getting file http://fedora.redhat.com/releases/fedora-core-1/headers/heade r.info [Errno 7] HTTP Error (CannotSendRequest): ってメッセージが返ってきます。 /etc/yum.conf は [main] cachedir=/var/cache/yum debuglevel=2 logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=fedora-release tolerant=1 exactarch=1 [base] name=Fedora Core $releasever - $basearch - Base baseurl=http://fedora.redhat.com/releases/fedora-core-$releasever [updates-released] name=Fedora Core $releasever - $basearch - Released Updates baseurl=http://fedora.redhat.com/updates/released/fedora-core-$releasever #[updates-testing] #name=Fedora Core $releasever - $basearch - Unreleased Updates #baseurl=http://fedora.redhat.com/updates/testing/fedora-core-$releasever てなっています。接続先のURLが変わったのでしょうか? ご教授いただけますか? 以上、何卒よろしくお願いいたします。

  • FedoraCore3でのyumコマンド

    お世話になります。 1日調べて解決できなかったので、ここで質問させてください。 現在サーバとしてFedoraCore3を使っています。 telnet-serverをインストールしようとyum install hogeと叩いたのですが エラーもなにも帰ってこない状態で応答がありません。 ^Cをするとプロンプトの画面に戻りますが。。 念のためyum自体を再インストールしてみましたが変わりません。 原因として何か考えられるでしょうか? 参考として、yumの設定ファイルを以下に載せます。 ※ /etc/yum.repos.d/fedora.repo [base] name=Fedora Core $releasever - $basearch - Base #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/ baseurl=ftp://ftp.riken.go.jp/pub/Linux/fedora/core/updates/3/i386 #mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-$releasever mirrorlist=file:///etc/yum.repos.d/local-base enabled=1 gpgcheck=1 ※ /etc/yum.repos.d/fedora-updates.repo [updates-released] name=Fedora Core $releasever - $basearch - Released Updates #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/$releasever/$basearch/ #mirrorlist=http://fedora.redhat.com/download/mirrors/updates-testing-fc$releasever mirrorlist=file:///etc/yum.repos.d/local-updates enabled=1 gpgcheck=1 ※ /etc/yum.conf [main] cachedir=/var/cache/yum debuglevel=2 logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=redhat-release tolerant=1 exactarch=1 retries=20 obsoletes=1 gpgcheck=1 ※ /usr/bin/yum #!/usr/bin/python import sys sys.path.insert(0, '/usr/share/yum-cli') import yummain try: yummain.main(sys.argv[1:]) except KeyboardInterrupt, e: print >> sys.stderr, "\n\nExiting on user cancel." sys.exit(1) お手数をおかけしますがよろしくお願いします。

  • さくらサーバ php5.3.10 バージョンアップ

    さくらサーバ RedHat php5.3.10 バージョンアップを行っております。 今回、yumの更新リストに入っていなかったためリポジトリを指定してアップデートを行いました。 更新コマンド(下記参照)を行い、phpのバージョン、mysqlのバージョンアップが 一通り完了して、特にエラーも発生しませんでした。 しかし、htaccessに設定しているerror_logを確認してみると 発生時刻が世界共通時刻(UTC)となっておりました。 (php:date()関数や、コマンドラインから[date]などでも確認したのですが そちらは日本時刻となっておりました。) 上記のUTC時刻はどこを直したら良いのでしょうか? 以下はアップデート時のコマンドになります。 ------------/ アップデートコマンド /------------ rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi rpm --import http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm rpm -e --nodeps mysql-5.0.95-1.el5_7.1.i386 yum --enablerepo=remi update mysql yum --enablerepo=remi install php-mcrypt yum --enablerepo=remi update php-pear vi /etc/php.ini ---/ 追加部分 /--- date.timezone = Asia/Tokyo -------------- service httpd restart ------------/ アップデートコマンド /------------ 色々と調査していたのですが、同じような現象が起きている方が おらず、凄く困っております。 ご存知の方がおりましたら、ご教示いただけますと幸いです。 何卒、よろしくお願いいたします。