0

As the title suggests, in bash the commands uname -m and arch both return x86_64, suggesting to me that I'm on a 64bit OS and processor. But, when I use aptitude or apt-get to install the package mongodb-10gen, the 32-bit version is installed.

So, I tried downloading the 64bit tarball:

curl http://downloads.mongodb.org/linux/mongodb-linux-x86_64-2.4.4.tgz > mongodb.tgz
tar -zxvf mongodb.tgz

But then, when I try to run one of the executables therein (from within the untarred directory) ./bin/mongo, the response is "No such file or directory." The case is the same for all of the executables in the bin directory, though they very clearly DO exist.

What's going on here? Is uname -m misreporting the OS?

Update I know permissions aren't the problem. I ran chown -R myusername mongodb/ and chmod -R 777 mongodb/ with mongodb/ being where I moved the untarred directory to.

tvanc
  • 131
  • 5

1 Answers1

0

You are missing shared libraries. Run ldd ./bin/mongo to see which ones.

However, you should use the 10gen repo. Do you see any configs in /etc/apt/conf.d setting APT::Architecture? If not, try forcing the architecture with apt-get install mongodb-10gen:amd64.

Edit: Are you using the 10gen repo? If not run apt-add-repository http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen

Edit2: WFM:

~/tmp$ curl http://downloads.mongodb.org/linux/mongodb-linux-x86_64-2.4.4.tgz > mongodb.tgz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 90.2M  100 90.2M    0     0  4088k      0  0:00:22  0:00:22 --:--:-- 4393k
~/tmp$ tar -zxf mongodb.tgz
~/tmp$ cd mongodb-linux-x86_64-2.4.4/
~/tmp/mongodb-linux-x86_64-2.4.4$ bin/mongo
MongoDB shell version: 2.4.4
connecting to: test
Fri Jun 14 13:44:59.379 JavaScript execution failed: Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:L112
exception: connect failed
Mark Wagner
  • 18,019
  • 2
  • 32
  • 47
  • `ldd ./bin/mongo` returned the same error, `ldd: ./bin/mongo: No such file or directory` Running `apt-get install mongodb-10gen:amd64` returned `E: Unable to locate package mongodb-10gen:amd64` – tvanc Jun 14 '13 at 20:32
  • Hmm...what does `echo bin/*` return? – Mark Wagner Jun 14 '13 at 20:39
  • It returns just `bin/*` – tvanc Jun 14 '13 at 20:41
  • Since `apt-add-repository` gave an error that the command was not found, I tried adding that repo to my `/etc/apt/sources.list` instead. Using apt-get or aptitude after that still led to the 32-bit package being installed – tvanc Jun 14 '13 at 21:47