You cannot capture loopback on Solaris, HP-UX, or Windows, however you can very easily work around this limitation by using a tool like RawCap.
RawCap can capture raw packets on any ip including 127.0.0.1
(localhost/loopback). Rawcap can also generate a pcap
file. You can open and analyze the pcap
file with Wireshark.
See here for full details on how to monitor localhost using RawCap and Wireshark.