I'm trying to execute my Ruby file that just prints out a string of text: this is literally the file:
puts "System Initialized"
but I keep getting an error every time I try it.
When I execute it, it looks like this:
My-Mac-mini:event_manager my_name$ ruby lib\event_manager.rb
The error message is as follows:
dyld: Library not loaded: /usr/local/lib/libgmp.10.dylib
Referenced from: /Users/crystalchoi/.rvm/rubies/ruby-2.1.3/bin/ruby
Reason: image not found
Trace/BPT trap: 5
I'm pretty new to using a Mac when it comes to programming, and I'm following a tutorial to do this, so I'm not sure what I'm doing wrong.
If anyone can help me decipher this error message and let me know how to correct it or can point me in the right direction, I would be very grateful.
ruby lib\event_manager.rb
Mac OS, like other *nix-based systems, uses / to separate the path components of files. Only Windows uses \. Instead use:
ruby lib/event_manager.rb
A Ruby tutorial isn't going to help a whole lot unless you understand the *nix command-line so you can move around and execute things, so I'd STRONGLY suggest you learn a lot more about how *nix works. Having developed on Linux for years, I have had to use my command-line knowledge just as much as my programming-language skills daily.
Does the specified library (/usr/local/lib/libgmp.10.dylib) exist?
I just checked and I could not find it at all.
GMP (libgmp) is an optional dependency of ruby. When you installed ruby, it was configured to use GMP, but you don't have the library file (/usr/local/lib/libgmp.10.dylib)
That's OK, you can get GMP ( The GNU Multiple Precision Arithmetic Library) from homebrew.
brew update
brew install gmp
You may need to re-install ruby afterward.
See https://superuser.com/questions/820364/ruby-installation-issues-with-rvm where other people had the same problem.
Advanced
If you're compiling ruby the old school way (./configure && make) then you could try using the --without-gmp config. option.
See https://bugs.ruby-lang.org/issues/8796
Related
The answer to this question might be easy for some of you but I haven't been able to figure it out. There is very little information on this topic on the web, I guess it doesn't interest a lot of people.
I'm trying to install qcl on my mac. However, I have no clue how to do so. I know I should compile it in a certain way (through GCC?), but I don't know how.
Here's where the installation files are : http://tph.tuwien.ac.at/~oemer/qcl.html
I also tried installing it through homebrew (brew install homebrew/science/qcl). But when I do so, I get an error when trying to run it (by typing qcl in the terminal). Here's the error in question :
dyld: Symbol not found: __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev
Referenced from: /usr/local/bin/qcl
Expected in: /usr/lib/libstdc++.6.dylib
in /usr/local/bin/qcl
Abort trap: 6
I'd really like to figure out a solution to the problem on my own but I guess my CS knowledge is insufficient. I need your help.
Thank you in advance for all your answers !
I am a little nervous to mess with anything in the terminal because of my small amount of experience of getting anything right on the first try. Which is why I'm asking.
I'm trying to run shp2pgsql with fresh install of OSX Mavericks. I've installed Postgres 9.3 v2.1.0-2 with PostGIS 2.1.
The error I'm getting is:
dyld: Library not loaded: #loader_path/../lib/libintl.8.dylib
Referenced from: /Library/PostgreSQL/9.3/bin/shp2pgsql
Reason: image not found
Trace/BPT trap: 5
I've looked at
http://librelist.com/browser//homebrew/2013/5/15/missing-dylib-files/#85200742c00af0a239140b02f860d987 which suggests that brew install gettext. This has installed libintl.8.dylib at:
/usr/local/Cellar/gettext/0.18.3.1/lib/libintl.8.dylib
I have found some resources on how to make symbolic (?) links, but I'm unsure if this is the appropriate solution or even how to do it in this specific case since shp2pgsql is referencing:
#loader_path/../lib/libintl.8.dylib
Thank you!
-Nicholas
The "loader" is /Library/PostgreSQL/9.3/bin/shp2pgsql. That makes dyld's notion of the #loader_path equal to /Library/PostgreSQL/9.3/bin. Substituting that into the library reference transforms #loader_path/../lib/libintl.8.dylib to /Library/PostgreSQL/9.3/bin/../lib/libintl.8.dylib. Simplifying that, we get /Library/PostgreSQL/9.3/lib/libintl.8.dylib. So that's where Postgres apparently expects its libintl library to be located.
If it's not there, that suggests the Postgres install is broken. You'd have to take that up with whoever provided it.
It's possible that you can work around this by setting a dyld environment variable. For example, you could try export DYLD_LIBRARY_PATH=/usr/local/lib before invoking Postgres. However, this will cause Postgres to use a different library than it was linked against, which isn't guaranteed to work.
You have to recompile shp2pgsql program. As you upgraded your system and libraries, you have now to recompile your program to those new libraries.
This is sort of a followup to this thread--unfortunately I didn't make any progress at the time so I thought I would start over. I am consistently getting this in the debugging log (QtCreator 2.3.1, Qt 4.7.3, gdb 7.2):
A syntax error in expression, near 0'.\n"
295^error,msg="A syntax error in expression, near0'."
&"Python scripting is not supported in this copy of GDB.\n"
296^error,msg="Python scripting is not supported in this copy of GDB."
&"Python scripting is not supported in this copy of GDB.\n"
297^error,msg="Python scripting is not supported in this copy of GDB."
&"Python scripting is not supported in this copy of GDB.\n"
298^error,msg="Python scripting is not supported in this copy of GDB."
&"Undefined command: \"bbsetup\". Try \"help\".\n"
299^error,msg="Undefined command: \"bbsetup\". Try \"help\"."
dThe debugging helper library was not found at .
&"source /home/matt/QtSDK-4.7.3/pythongdb/gdb\n"
&"/home/matt/QtSDK-4.7.3/pythongdb/gdb:1: Error in sourced command file:\n"
&"Undefined command: \"\". Try \"help\".\n"
300^error,msg="/home/matt/QtSDK-4.7.3/pythongdb/gdb:1: Error in sourced command file:\nUndefined command: \"\". Try \"help\"."
&"Undefined command: \"bbsetup\". Try \"help\".\n"
301^error,msg="Undefined command: \"bbsetup\". Try \"help\"."
dThe debugging helper library was not found at .
302^done
<303set substitute-path /var/tmp/qt-src /usr/include
The specific problem is that without the debugging helper, I'm unable to see the contents of QStrings and many other data structures during the debugging process, which makes it much more time-consuming. The error messages above are symptomatic, the problem arises when gdb can't find the debugging helper.
Anyway, looking at the discussion referenced in the answer in the above thread, I hunted around for different versions of gdb on my system but each one of them produced the same error (with the path changed appropriately of course), including version 7.3.1 when I downloaded it. I've also located libDebuggingHelper.so, but sticking it in different places hasn't helped either. Lastly looking at ./configure --help for gdb, I didn't see any options for enabling/disabling python in the build. Anybody know how I can get this to work?
This site claims you need to configure GDB using
./configure --with-python
It's pretty clear from the error message that the GDB you built does not have python support compiled in.
In gdb/config.log look for messages like checking whether to use python and see why GDB decided to not use Python on your system.
Perhaps you need to install Python development packages?
Once you've configured GDB to use Python, an easy way to check whether Python support is properly compiled in is:
(gdb) python print "hello"
If that prints anything other than hello, you are still not where you want to be.
I solved the problem with
sudo apt-get install gdb-multiarch
Thanks to #Employed-Russian for allowing me to check if GDB indeed has python support.
I did have to use the syntax
(gdb) python print("Hello")
To get a proper response from python within GDB.
i'm having loads of problem in trying to install CPAN Modules. Using the cpan.exe, I try to install a module with, for example, "install Win32::IE::Mecahnize" but I end up hitting a wall. In the beginning it find dmake.EXE and is okay, but when the install finishes it says dmake.exe is NOT OK, and Dmake.exe Error code 255 , while making 'test-dynamic'.
I'm very confused as to what is happening and why its not working?? Help is much appreciated.
This is the current error I get:
dmake.EXE: Error code 255, while making 'test_dynamic'
C:\strawberry\c\bin\dmake.EXE test -- NOT OK
Running make install
make test had returned bad status, won't install without force
ABELTJE/Win32-IE-Mechanize-0.009.tar.gz : make_text NO
It's not your fault. That module doesn't work for anyone. When you run into a failure with a module, investigate it to see if other people are having problems. You can look on its CPAN Search page to see that there are no passing testers reports for that distribution. That distribution should not install without force. We cover some of this in Effective Perl Programming's section on researching modules.
Can you install other modules without a problem?
ya, well here's the thing, I have both ActivePerl and Strawberry Perl installed, is that a problem?
Shouldn't be an issue. However, you need to make sure that Strawberry Perl's distro contains the binaries and libraries you need to build and install non-text only modules. You need to make sure you're using Strawberry Perl's stuff and not ActivePerl. I recommend putting Strawberry Perl in your PATH, but not ActivePerl.
Easiest thing to do is not use CPAN, but ActivePerl's own PPM manager. ActivePerl has probably prebuilt about 90% of the CPAN modules and have them available via their PPM manager. Try that.
It's late and I should go to bed and maybe that's why I can't figure this out. I'm on a fedora-13 machine and I just ran
yum install gambit-c
I installed it because I want to follow along in a schemed text book.
but now that it's installed, how do I start the scheme interpreter??
It looks from the RPM listing that the binaries are named gsi, gsix, and gsc, all in /usr/bin. I suspect that gsi is the interpreter.
For more details, there's also the manual entry for gsi.
BTW: I don't know about the Fedora RPM, but I found that the Ubuntu repository's Gambit-C was quite outdated (4.0-ish), with missing features like simple compilation of stand-alone executables. The most recent version is 4.6. If your RPM's version is a few decimal places behind, I'd suggest just installing from source; it's a pretty standard configure -> make -> make install sequence. Just remember the following option when running configure:
./configure --enable-single-host
This speeds things up quite a bit.