Bill Lovett

NetBSD Weirdness: pkgsrc and "cd: can't cd to .."

Posted on September 20th, 2005

Everything was going swell on my NetBSD machine until tonight. I finally got around to building packages from my recently-minted version of pkgsrc that I retrieved through anonymous CVS. In theory, installing a package should be a simple matter of two commands. But I ran into trouble on step 1.

It doesn't matter which package I try to build, the result is always the same. I type make, and instead of seeing the usual nonsense scroll across the machine that at least tells you the machine is working on something, I get an endless loop of this message:

cd: can't cd to ..

Very strange.

I see from the NetBSD User Guide that in order to install packages from source, you need to have the "comp" and "text" distribution sets installed. I didn't have the faintest idea whether I did or not, but I found a helpful post in fa.netbsd.help that explained how distribution sets were really just tar files available through the NetBSD ftp server. After a little bit of poking around, I found the files in question and downloaded them into /tmp, then ran:

cd /
pax -zrpe -f /tmp/comp.tar.gz
to copy the directories in the tar file into their corresponding location on my machine. Still no go-- that "can't cd" message seems like it's here to stay.

I can install precompiled packages just fine, and otherwise the machine is fully functional albeit rarely logged into. I can't imagine this is a substantial problem I'm dealing with, it's got to be something simple. But no clues yet about how to go about fixing it.

Back to the index of all blog entries