Pkg vs Ports

I am a beginner with FreeBSD. I just installed it on a virtual machine on my laptop. I want to set up a desktop for daily use. I tried installing packages but got a message that said I needed to Consider changing PACKAGESITE. I instead used the ports method to install xorg. Since I installed the xorg with ports does that mean I am now stuck with using ports for everything? And how to I solve the problem with changing the PACKAGESITE?
 
Please don't necropost old threads with unrelated issues. Question split off to its own thread.

I tried installing packages but got a message that said I needed to Consider changing PACKAGESITE. I instead used the ports method to install xorg.
And how to I solve the problem with changing the PACKAGESITE?

What is the exact message you're getting?
 
Please don't necropost old threads with unrelated issues. Question split off to its own thread.




What is the exact message you're getting?
I can't figure out how to copy and paste the message from the virtual machine terminal, so I will type a part of the message here....

"Address resolution failed for http://pkg.FreeBSD........:amd64/quarterly" Consider changing PACKAGESITE.
 
Sounds more like there is something wrong with the Networking in your VM (VirtualBox?).
If it's VirtualBox, what settings do you use for the NIC's? (NAT, Bridge, HostOnly....)
 
I can't figure out how to copy and paste the message from the virtual machine terminal, ...
Take a screenshot of the VM from the virtualization software (VirtualBox, VMWare, etc.). In case the VM software doesn't provide such a function use the host system. E.g. VirtualBox:

VM-screenshot.jpeg VM-screenshot2.png

To the problem, if installing ports does work, meaning fetching the distfiles, then the network is functional. Maybe the package repositories server is temporarily unreachable. Try installing a small package, e.g: pkg install sl

Or changing the name server might help. What does drill pkg.freebsd.org return?

Since I installed the xorg with ports does that mean I am now stuck with using ports for everything?
You can force a reinstall of all installed software using packages after the address resolution failure is resolved: pkg upgrade -f
 
This is an indication that your DNS isn't working. You either have no or the wrong DNS settings in /etc/resolv.conf or you don't have a network connection at all.
Does it matter whether I use a VPN? I am in China and need to use a VPN most of the time and I change VPN locations frequently.
 
Take a screenshot of the VM from the virtualization software (VirtualBox, VMWare, etc.). In case the VM software doesn't provide such a function use the host system. E.g. VirtualBox:

View attachment 8768 View attachment 8770

To the problem, if installing ports does work, meaning fetching the distfiles, then the network is functional. Maybe the package repositories server is temporarily unreachable. Try installing a small package, e.g: pkg install sl

Or changing the name server might help. What does drill pkg.freebsd.org return?


You can force a reinstall of all installed software using packages after the address resolution failure is resolved: pkg upgrade -f
See attached screenshot. I am using a VPN. I don't know if this could be the reason. When I turned the VPN off I still had the same problem. How do I change the nameserver?
 

Attachments

  • Screenshot_freebsd12.2-notZFS_2020-11-20_18:11:33.png
    Screenshot_freebsd12.2-notZFS_2020-11-20_18:11:33.png
    12.9 KB · Views: 112
I turned off the VPN, now I get this message. See attached

See attached screenshot. I am using a VPN. I don't know if this could be the reason. When I turned the VPN off I still had the same problem. How do I change the nameserver? It looks like if I turn off the VPN I can install packages. I successfully executed pkg install sl.

I found the DNS server address in my VPN settings: So how do I add that so I can use the VPN?
 

Attachments

  • Screenshot_freebsd12.2-notZFS_2020-11-20_18:13:42.png
    Screenshot_freebsd12.2-notZFS_2020-11-20_18:13:42.png
    10.6 KB · Views: 96
After installing FreeBSD in a VM, i'd rather just fire off a "freebsd-update fetch install"
If it already fails there, it's 99% a problem with the Network of the VM
 
Does it matter whether I use a VPN?
I assume that VPN is running on the host? Then no, it shouldn't matter.

How is the VM configured? Did you use bridged, NAT or host-only? In your case NAT is probably the easiest to use.
 
I am using NAT virtio. The VPN is running on the host. When I turn off the VPN I can install packages. When I turn on the VPN I can't.
I assume that VPN is running on the host? Then no, it shouldn't matter.

How is the VM configured? Did you use bridged, NAT or host-only? In your case NAT is probably the easiest to use.
 
I need to investigate whether this problem is due to the virtual machine set up or something else. When I set up FreeBSD on a different machine directly without a virtual machine I also had the same problem. I guess I need to create a new thread on the forum for this problem?
 
I use a vpn called VPN.ac. With the VPN on I can't download anything from the FreeBSD website, including the ISOs and handbook, etc. I also can't install packages. I want to use a VPN to maintain privacy as I am located outside the US. How can I use a VPN with FreeBSD?
 
I use a vpn called VPN.ac. With the VPN on I can't download anything from the FreeBSD website, including the ISOs and handbook, etc. I also can't install packages. I want to use a VPN to maintain privacy as I am located outside the US. How can I use a VPN with FreeBSD?
You have a VPN already running on the host. You just need to configure your virtualization software to bind the NAT network to that interface. You never mentioned what virtualization software you're using and what the host OS is, so we don't know how to help you.
 
You have a VPN already running on the host. You just need to configure your virtualization software to bind the NAT network to that interface. You never mentioned what virtualization software you're using and what the host OS is, so we don't know how to help you.
I am using KVM -QEMU (virtual machine manager) on Fedora 33.

But I have problems when using the VPN on the host without a VPN. I also installed FreeBSD on a different laptop and I am not using a virtual machine.

Regarding the virtual machine, I will research how to configure the virtualization software to bind the NAT network. However, why do I also have problems downloading anything from the FreeBSD website if I am using a VPN on the host and without using a virtual machine?
 
As I understood the situation is as follows, the system has access to the internet through VPN, but it can't reach some sites like https://pkg.freebsd.org to download packages or https://ftp.freebsd.org to download documentation files (handbook)/ installations ISO's, on the other hand it can fetch distfiles to install ports (xorg, post #1).

It could be a DNS matter as SirDice in post #7 commented. Seeing at https://vpn.ac/faq:

Code:
What DNS servers do you use? Do you protect my DNS queries?

We protect DNS queries against MitM hijacking and snooping, wiretapping. We have our own,
private DNS resolvers outside of US and UK. All DNS queries sent by VPN users are forwarded
by our VPN servers to the private resolvers, through encrypted tunnels. As long as you don't
manually change your DNS servers while being connected to our VPN, and you use the one we
assign, no DNS queries will leak out of our VPN servers through our hosting partners and IP carriers.

Try changing the name server (temporarily). On Fedora 33 or laptop FreeBSD set in /etc/resolv.conf nameserver 1.1.1.1 on top of the other entries. I don't know about Fedora, but on FreeBSD that entry won't persist a reboot, however first let's see if changing the name server helps.
 
As I understood the situation is as follows, the system has access to the internet through VPN, but it can't reach some sites like https://pkg.freebsd.org to download packages or https://ftp.freebsd.org to download documentation files (handbook)/ installations ISO's, on the other hand it can fetch distfiles to install ports (xorg, post #1).

It could be a DNS matter as SirDice in post #7 commented. Seeing at https://vpn.ac/faq:

Code:
What DNS servers do you use? Do you protect my DNS queries?

We protect DNS queries against MitM hijacking and snooping, wiretapping. We have our own,
private DNS resolvers outside of US and UK. All DNS queries sent by VPN users are forwarded
by our VPN servers to the private resolvers, through encrypted tunnels. As long as you don't
manually change your DNS servers while being connected to our VPN, and you use the one we
assign, no DNS queries will leak out of our VPN servers through our hosting partners and IP carriers.

Try changing the name server (temporarily). On Fedora 33 or laptop FreeBSD set in /etc/resolv.conf nameserver 1.1.1.1 on top of the other entries. I don't know about Fedora, but on FreeBSD that entry won't persist a reboot, however first let's see if changing the name server helps.
I do not know how to add the nameserver 1.1.1.1 on top of the other entry. I am new to this. Do I just add it in front of the first one and add a comma between them?
 
I do not know how to add the nameserver 1.1.1.1 on top of the other entry. ...... Do I just add it in front of the first one and add a comma between them?
No, from resolv.conf(5), nearly at the bottom of the manual:

Rich (BB code):
...
The keyword and value must    appear on a single line, and the keyword (for
     example, nameserver) must start the line....
On laptop FreeBSD's /etc/resolv.conf:
Code:
# Generated by resolvconf

nameserver    1.1.1.1        # this entry won't persist a reboot, it will be overwritten by resolvconf(8)
nameserver    192.168.122.1

On Fedora:
Code:
nameserver    1.1.1.1
nameserver    192.168.122.1

I am new to this.
Then manuals/handbooks/wiki's are your source of information, eg:

Code:
man apropos
apropos resolv.conf
man resolv.conf

In almost every man page is a "SEE ALSO" section, with further manuals related to the current man page.

Bookmark in your browser https://www.freebsd.org/docs/books.html, or have it all installed locally on your system:
pkg install en-freebsd-doc, then point your browser (and bookmark them in a FreeBSD Doc folder of the browser).

For the handbook to
/usr/local/share/doc/freebsd/en_US.ISO8859-1/books/handbook/index.html

For the FAQ
/usr/local/share/doc/freebsd/en_US.ISO8859-1/books/faq/index.html

All others:
/usr/local/share/doc/freebsd/en_US.ISO8859-1/books
/usr/local/share/doc/freebsd/en_US.ISO8859-1/articles

FreeBSD wikis: https://wiki.freebsd.org
 
  • Thanks
Reactions: neb
Back
Top