Static IP configuration causing apt-get errors

Solution 1:

It sounds like you aren't able to resolve domains via DNS. Assuming this is the case, you can likely fix it by adding a dns-nameservers line to /etc/network/interfaces

auto eth0
iface eth0 inet static
    address 192.168.2.2
    netmask 255.255.255.0
    gateway 192.168.2.1
    dns-nameservers 192.168.2.1

and then running

resolvconf -u

as root to update /etc/resolv.conf. Feel free to include a DNS search domain record (which is also typically handed out via DHCP). Refer to resolvconf(8) for more information.