6
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 5 years have passed since last update.

FreeBSD をインストールしたらpkgやporstnapを使おうとしてもError Fetchingとなる

Posted at

errorの内容

vagrantを使ってFreeBSDを導入していたが、DVDなどからインストールを真面目にやってなかったのでやってみたらひっかかった。

root@FreeBSD11:~# pkg update
The package management tool is not yet installed on your system.
Do you want to fetch and install it now?[y/N]:y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:11:adm64/quarterly,please wait...
pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:11:adm64/quarterly/Latest/pkg.txz: No address record
A pre-built version of pkg could not be found for your system.
Consider changeing PACKAGESITE or installing it from ports: 'ports-mgmt/pkg'.


root@FreeBSD11:~# portsnap fetch
Looking up portsnap.FreeBSD.org mirrors...none found.
Fetching snapshot tag from portsnap,FreeBSD.org... failed.
No mirrors remaining,giving up.

/etc/resolv.confをvagnrantで導入したものと比較したらおかしかった

  • なぜか2つ入っていた
/etc/resolv.conf
#nameserver 10.x.x.x

nameserver 127.0.0.1

修正

  • vagrantできちんと使えてるアドレスに修正したらpkgもportsnapも普通に使えた
/etc/resolv.conf
nameserver 10.x.x.x

#nameserver 127.0.0.1

結論

インストールのマニュアルを見ずに適当にDNS設定をしたのが行けないとは思う。
メッセージをちゃんと読むと「No address record」と書いてあったのでportsnapを実行する前に気づきたかった。

6
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
6
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?