If you're building Git from it's latest source tarball or from the repository,
remember to not use --with-shell="shell"
if building with ./configure
.
Or at least don't use ZSH as the shell specified. Different shells cause
errors due to differences in how variables are set and used during the build
chain.
Last active
March 2, 2016 18:24
-
-
Save lewdlime/62e0db70f1cab956837c to your computer and use it in GitHub Desktop.
Notes for building Git from source tarball or repository
version 1.3.3
NOTE: Check what the current release is first, and insert that version number for where
$ver
is below.
$ wget https://github.com/mongodb/mongo-c-driver/releases/download/$ver/mongo-c-driver-$ver.tar.gz
$ tar xzf mongo-c-driver-$ver.tar.gz
$ cd mongo-c-driver-$ver
$ ./configure
$ make
$ sudo make install
$ git clone https://github.com/mongodb/mongo-c-driver.git
$ cd mongo-c-driver
$ [git checkout x.y.z] # To build a particular release
$ ./autogen.sh --with-libbson=bundled [--prefix=CDRIVER-INSTALL-PATH]
$ make
$ sudo make install
version 3.0.0
NOTES: Requires the following:
- CMake version 3.2+
- automake
- autoconf
- libtool
- Clang version 3.5+, Apple Clang version 5.1+, GCC version 4.8.2+, or VC2015 Update 1+
- MongoDB C driver version 1.3.1+
$ git clone https://github.com/mongodb/mongo-c-driver.git
$ cd mongo-c-driver
$ ./autogen.sh --with-libbson=bundled [--prefix=CDRIVER-INSTALL-PATH]
$ [sudo] make && sudo make install
$ cd ..
$ git clone https://github.com/mongodb/mongo-cxx-driver.git
$ cd mongo-cxx-driver/build
$ [PKG_CONFIG_PATH=CDRIVER_INSTALL_PATH/lib/pkgconfig] cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
$ [sudo] make && sudo make install
hellomongo.cpp
:
#include <iostream>
#include <bsoncxx/builder/stream/document.hpp>
#include <bsoncxx/json.hpp>
#include <mongocxx/client.hpp>
#include <mongocxx/instance.hpp>
int main(int, char**) {
mongocxx::instance inst{};
mongocxx::client conn{mongocxx::uri{}};
bsoncxx::builder::stream::document document{};
auto collection = conn["testdb"]["testcollection"];
document << "hello" << "world";
collection.insert_one(document.view());
auto cursor = collection.find({});
for (auto&& doc : cursor) {
std::cout << bsoncxx::to_json(doc) << std::endl;
}
}
$ c++ --std=c++11 hellomongo.cpp -o hellomongo $(pkg-config --cflags --libs libmongocxx)
$ ./hellomongo
version 2.2.3
NOTE: Use NuGet to install.
<packages>
<package id="MongoDB.Driver" version="2.2.0" />
<package id="MongoDB.Driver.Core" version="2.2.0" />
<package id="MongoDB.Bson" version="2.2.0" />
</packages>
version 3.2.2
$ git clone https://github.com/mongodb/mongo-java-driver.git
$ cd mongo-java-driver
$ ./gradlew check
<dependencies>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver</artifactId>
<version>3.2.2</version>
</dependency>
</dependencies>
dependencies {
compile 'org.mongodb:mongodb-driver:3.2.2'
}
version 3.2.1
NOTES: In addition to the standard driver, the following community drivers are also available:
- MongoEngine
[sudo] pip install mongoengine
- MongoKit
[sudo] pip install mongokit
- Monary (Requires MongoDB C driver, with SSL & SASL compiled in, see also https://bitbucket.org/djcbeach/monary)
[sudo] pip install monary
- Django-Nonrel (Not a driver; this is a fork of Django that support various NoSQL database backends. See also: https://github.com/django-nonrel/django)
git clone https://github.com/django-nonrel/django.git django-nonrel
- Django-MongoDB-Engine (Also not a driver, but a Django add-on to provide NoSQL support; Requires Django-Nonrel & djangotoolbox)
pip install https://github.com/django-nonrel/mongodb-engine
- Django-Mongonaut (Another Django add-on to provide NoSQL support. Requires
mongoengine
&pymongo
.)pip install django-mongonaut
[sudo] pip install [-U] pymongo
version 2.1.7
[sudo] npm i [-g] mongodb
version 2.2.4
[sudo] gem install mongo
version 1.1.0
libraryDependencies += "org.mongodb.scala" %% "mongo-scala-driver" % "1.1.0"
<dependencies>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-scala-driver</artifactId>
<version>1.1.0</version>
</dependency>
</dependencies>
version 1.1.2
$ pecl install mongodb
$ echo "extension=mongodb.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
version
$ cpanm --installdeps .
$ # using CPAN.pm, but bypassing non-functional pod tests
$ cpan TAP::Harness::Restricted
$ PERL_MM_USE_DEFAULT=1 HARNESS_CLASS=TAP::Harness::Restricted cpan Dist::Zilla
$ cpan `dzil authordeps`
$ dzil authordeps | cpanm
$ [dzil build]
$ [dzil test]
$ [dzil xtest]
$ # using cpanm, bypassing *all* tests
$ cpanm -n Dist::Zilla
version 2.0.0
[sudo] go get gopkg.in/mgo.v2
[sudo] go get gopkg.in/mgo.v2/bson
[sudo] go get gopkg.in/mgo.v2/txn
version 0.9.4
$ git clone git://github.com/comtihon/mongodb-erlang.git
$ cd mongodb-erlang
$ make
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment