I'm a noob to this forum so please be tolerant of noobishness.
I include some background as it might be relevant.
I tried to install latexit. Upon opening it says that it cannot find color.sty and when I try to use it it gives me (null),(null). Since that installation LaTeX has not been working:
dyld: Library not loaded: /opt/local/lib/libpoppler.7.dylib
Referenced from: /opt/local/bin/latex
Reason: image not found
Something I found online implied that I should upgrade texlive. I tried upgrade it using mac ports and it tried to install sqlite3 and received an error:

Error: Target org.macports.build returned: shell command failed (see log for details)
Log for sqlite3 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org _release_ports_databases_sqlite3/main.log
Error: Unable to upgrade port: 1
Error: Unable to execute port: upgrade libsdl failed


I checked the log and it said it was an input/output error when trying to access ioctl.h. I tried to compile and install sqlite3 manually (downloaded it:
./configure
make
make install
) and I received the same error.
sqlite3.c:24389:24: error: /usr/include/sys/ioctl.h: Input/output error
sqlite3.c: In function 'afpSetLock':
sqlite3.c:26951: error: expected expression before 'struct'
make: *** [sqlite3.lo] Error 1

The weird thing is, this is happening with other installations calling different libraries as well e.g.

Error: Target org.macports.build returned: shell command failed (see log for details)
Error: Failed to install python24
Log for python24 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org _release_ports_lang_python24/main.log

(input/output error referring to some other library)

e.g.2 poppler-0.16.7 (seemed the obvious thing given the library with which LaTeX had issues):

In file included from /usr/include/c++/4.2.1/cstdio:50,
from PNGWriter.h:22,
from PNGWriter.cc:16:
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++config.h:41:29: error: /usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/os_defines.h: Input/output error
make[2]: *** [PNGWriter.lo] Error 1
make[1]: *** [all-recursive] Error 1


Any advice on stuff to try would be greatly appreciated.