Solved Can't install new packages

When I run # pkg install en-freebsd-doc or try to install any other package I get this:
Code:
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstraping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:10:amd64/quarterly. please wait...
pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:10:amd64/quarterly/Lastest/pkg.txz: No address record
A pre-built version of pkg could not be found for your system.
Consider changing PACKAGESITE or installing it from ports: 'ports-mgmt/pkg'.
I believe it's a network problem because I had some problems setting up the network at bsdinstall(It couldn't adquire DCHP lease), so I had to manually edit the configuration files later.
Here are the files:
/boot/loader.conf
Code:
if_ath_load="YES"
wlan_wep_load="YES"
/etc/rc.conf
Code:
hostname="My_Hostname"
wlans_ath0="wlan0"
ifconfig_wlan0="DHCP"
sshd_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
/etc/wpa_supplicant.conf
Code:
ctrl_interface=/var/run/wpa_supplicant
eapol_version=2
ap_scan=1
fast_reauth=1

network={
[INDENT]ssid="my_network"
key_mgmt=NONE
wep_key1=ffffffffff
wep_tx_keyidx=1
priority=5[/INDENT]
}
network={
[INDENT]priority=0
key_mgmt=NONE[/INDENT]
}
Did I do something wrong?
 
"No address record" indicates you have a DNS issue. Are the DNS servers you get from DHCP correct?
 
I don't really know how to check this, but other systems work just ok. Believe my laptop can't connect to the modem, because after I run #wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf I get this:
Code:
Successfully initiated wpa_supplicant
wlan0: Trying to associate with aa:aa:aa:aa:aa:aa (SSID='my_network' freq=2437 MHz)
wlan0: Authentication with aa:aa:aa:aa:aa:aa timed out.
wlan0: CTRL-EVENT-DISCONNECTED bssid=aa:aa:aa:aa:aa:aa reason=3 locally_generated=1
wlan0: Trying to associate with aa:aa:aa:aa:aa:aa (SSID='my_network' freq=2437 MHz)
wlan0: Authentication with aa:aa:aa:aa:aa:aa timed out.
wlan0: CTRL-EVENT-CONNECTED - Connection to aa:aa:aa:aa:aa:aa completed [id=0 id_str=]
After the last message I don't return to the command line and if I try using another tty It gives the same error of no address record.
 
It looks like you're not connected properly. Don't use WEP for wireless, it's seriously broken and can be hacked in just a couple of minutes.
 
AlexSantee,

I don't really know how to check this
I quote this from the Handbook: (more details here: https://www.freebsd.org/doc/handbook/configtuning-configfiles.html)
How a FreeBSD system accesses the Internet Domain Name System (DNS) is controlled by resolv.conf(5).

The file to look at is /etc/resolv.conf.
After the last message I don't return to the command line

That's because wpa_supplicant is running on the foreground. To run it in the background add the -B switch. For details read wpa_supplicant(8).
 
When I run #pkg install en-freebsd-doc or try to install any other package I get this:
Here are the files:
/boot/loader.conf
Code:
if_ath_load="YES"
wlan_wep_load="YES"
It is not necessary to load the Atheros kernel module, the generic kernel has it already.
Are you really using WEP? Please stop, unless you like sharing private data and bandwidth with everyone within range.

/etc/wpa_supplicant.conf
Code:
ctrl_interface=/var/run/wpa_supplicant
eapol_version=2
ap_scan=1
fast_reauth=1
Why are you changing eapol_version? The other two are defaults and I believe that setting default values is generally a mistake.
 
I took an hint from here: https://azitech.wordpress.com/2010/02/22/deauthenticating-reason3/:
perhaps do you have more than one instance of wpa_supplicant(8) running? Or is the OS already trying to connect?
According to the Handbook: (https://www.freebsd.org/doc/handbook/network-wireless.html)
30.3.4.1.2.1. Selecting an Access Point

Most of the time, it is sufficient to let the system choose an access point using the builtin heuristics. This is the default behaviour when an interface is marked as up or it is listed in /etc/rc.conf:
Code:
wlans_ath0="wlan0"
ifconfig_wlan0="DHCP"
If I understand correctly, with this settings FreeBSD tries to connect without using wpa_supplicant(8).
 
Problem solved. I reinstalled the system without using bsdinstall to set up the network and edited the configuration files manually.
The /boot/loader.conf and the /etc/rc.conf are the same, but I used #ifconfig wlan0 inet 10.1.1.10 netmask 255.0.0.0 ssid my_network wepmode on weptxkey 1 wepkey 1:0xffffffffff instead of /etc/wpa_supplicant.conf(the first time used this I used an already used IP, so I though it didn't worked with my network). Thanks for the help.
 
You really, really should not use WEP. Security on it is weak, so unless you live alone with no other people around, someone will break it and (ab)use your wireless network soon.
 
Back
Top