question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot install on OSX

See original GitHub issue

$ sudo npm install nodegit npm http GET https://registry.npmjs.org/nodegit npm http 304 https://registry.npmjs.org/nodegit

nodegit@0.0.7 preinstall /Users/alexandruvladutu/www/libgit2/node_modules/nodegit ./build.sh

Cloning libgit2 Cloning into ‘/Users/alexandruvladutu/www/libgit2/node_modules/nodegit/vendor/libgit2’… remote: Counting objects: 31919, done. remote: Compressing objects: 100% (9629/9629), done. remote: Total 31919 (delta 22743), reused 30468 (delta 21492) Receiving objects: 100% (31919/31919), 8.52 MiB | 1.80 MiB/s, done. Resolving deltas: 100% (22743/22743), done. Note: checking out ‘v0.15.0’.

You are in ‘detached HEAD’ state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example:

git checkout -b new_branch_name

HEAD is now at 3eaf34f… libgit2 v0.15.0 “Das Wunderbar Release” Checking for program gcc or cc : /usr/bin/gcc Checking for program cpp : /usr/bin/cpp Checking for program ar : /usr/bin/ar Checking for program ranlib : /usr/bin/ranlib Checking for program g++ or c++ : /usr/bin/g++ Checking for program ar : /usr/bin/ar Checking for program ranlib : /usr/bin/ranlib Checking for g++ : ok Checking for node path : ok /Users/alexandruvladutu/.node_libraries Checking for node prefix : ok /Users/alexandruvladutu/.nvm/v0.8.11 /bin/sh: cmake: command not found ‘configure’ finished successfully (0.075s) Waf: Entering directory /Users/alexandruvladutu/www/libgit2/node_modules/nodegit/build' /bin/sh: cmake: command not found [ 1/13] cxx: src/base.cc -> build/Release/src/base_1.o [ 2/13] cxx: src/sig.cc -> build/Release/src/sig_1.o [ 3/13] cxx: src/blob.cc -> build/Release/src/blob_1.o [ 4/13] cxx: src/error.cc -> build/Release/src/error_1.o [ 5/13] cxx: src/object.cc -> build/Release/src/object_1.o [ 6/13] cxx: src/reference.cc -> build/Release/src/reference_1.o [ 7/13] cxx: src/repo.cc -> build/Release/src/repo_1.o [ 8/13] cxx: src/commit.cc -> build/Release/src/commit_1.o [ 9/13] cxx: src/oid.cc -> build/Release/src/oid_1.o [10/13] cxx: src/revwalk.cc -> build/Release/src/revwalk_1.o [11/13] cxx: src/tree.cc -> build/Release/src/tree_1.o [12/13] cxx: src/tree_entry.cc -> build/Release/src/tree_entry_1.o [13/13] cxx_link: build/Release/src/base_1.o build/Release/src/sig_1.o build/Release/src/blob_1.o build/Release/src/error_1.o build/Release/src/object_1.o build/Release/src/reference_1.o build/Release/src/repo_1.o build/Release/src/commit_1.o build/Release/src/oid_1.o build/Release/src/revwalk_1.o build/Release/src/tree_1.o build/Release/src/tree_entry_1.o -> build/Release/nodegit.node ld: library not found for -lgit2 collect2: ld returned 1 exit status Waf: Leaving directory/Users/alexandruvladutu/www/libgit2/node_modules/nodegit/build’ Build failed: -> task failed (err #1): {task: cxx_link base_1.o,sig_1.o,blob_1.o,error_1.o,object_1.o,reference_1.o,repo_1.o,commit_1.o,oid_1.o,revwalk_1.o,tree_1.o,tree_entry_1.o -> nodegit.node} make: *** [build] Error 1 npm ERR! nodegit@0.0.7 preinstall: ./build.sh npm ERR! sh "-c" "./build.sh" failed with 2

node -v && npm -v v0.8.11 1.1.62

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:16

github_iconTop GitHub Comments

1reaction
alessioalexcommented, Mar 26, 2013

Works great on OSX (it install well and I’ve used it), installs on Ubuntu but does not work on require, see example:

git = require('nodegit')                                                                                                   
Error: /home/alessio/www/nodegit_folder/node_modules/nodegit/build/Release/nodegit.node: undefined symbol: _ZN7GitBlob16Creat
eFromBufferEP7git_oidP14git_repositoryPKvj                                                                                   
    at Object.Module._extensions..node (module.js:485:11)                                                                    
    at Module.load (module.js:356:32)                                                                                        
    at Function.Module._load (module.js:312:12)                                                                              
    at Module.require (module.js:362:17)                                                                                     
    at require (module.js:378:17)                                                                                            
    at Object.<anonymous> (/home/alessio/www/nodegit_folder/node_modules/nodegit/lib/index.js:28:17)                         
    at Module._compile (module.js:449:26)                                                                                    
    at Object.Module._extensions..js (module.js:467:10)                                                                      
    at Module.load (module.js:356:32)                                                                                        
    at Function.Module._load (module.js:312:12)                                                                              
>
0reactions
alessioalexcommented, Apr 5, 2013

Everything works great now, I was able to install it on that Ubuntu machine which didn’t previously work. AWESOME! Thanks for sticking with me all this time 👍 appreciate it !

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix the "macOS Could Not Be Installed on Your ...
1. Restart Your Mac and Retry the Installation · 2. Set Your Mac to the Correct Date and Time · 3. Create Enough...
Read more >
If an error occurred while updating or installing macOS
If an error occurred while updating or installing macOS · Check your internet connection · Install in safe mode · Install after repairing...
Read more >
macOS could not be installed on your computer? Here's what ...
How to fix “macOS could not be installed on your computer” · 2. Try running the installer again while in Safe mode ·...
Read more >
macOS Could Not Be Installed on Your Computer? Read This!
Fix 1: Restart the Mac and Reintall · Fix 2: Check your Mac Date and Time · Fix 3: Free Up Space for...
Read more >
How to Fix “macOS Could Not Be Installed on Your Computer”
Solutions to Fix a macOS Could Not Be Installed On Your Computer Error · Restart Your Mac · Make Sure The Date And...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found