- ‘cannot execute binary file’ error on a Mac #114
- Comments
- andyprata commented Nov 6, 2015
- djhoese commented Nov 6, 2015
- andyprata commented Nov 6, 2015
- djhoese commented Nov 7, 2015
- andyprata commented Nov 7, 2015
- djhoese commented Nov 8, 2015
- andyprata commented Nov 8, 2015
- djhoese commented Nov 8, 2015
- andyprata commented Nov 8, 2015
- djhoese commented Nov 9, 2015
- andyprata commented Nov 9, 2015
- djhoese commented Nov 9, 2015
- andyprata commented Nov 9, 2015
- Question: Q: /bin/bash: cannot excute binary file
- Helpful answers
- cannot execute binary file: Exec format error #1112
- Comments
- crafy commented Oct 28, 2016
- skewer
- bash: /home/xuye266/.linuxbrew/bin/skewer: cannot execute binary file: Exec format error
‘cannot execute binary file’ error on a Mac #114
Comments
andyprata commented Nov 6, 2015
I’m new to polar2grid and I’ve just downloaded the CSPP_IMAPP_POLAR2GRID_V2.0.tar.gz bundle from here: http://cimss.ssec.wisc.edu/cspp/download/index.php
I’ve followed the installation instructions however when I try to run any of the bash scripts I get this error:
I believe I have the polar2grid home path correct:
I’ve also tried the following combinations to make the bash script executable:
But I still get the same ‘cannot execute binary file’ error. I’m on a Mac system (OS X 10.10.5 Yosemite) running the bash shell from Terminal. Any help on this would be much appreciated.
The text was updated successfully, but these errors were encountered:
djhoese commented Nov 6, 2015
Hi Andy,
The tarball available from the CSPP site is for 64-bit RHEL 5+ (or CentOS 5+) linux systems only. You won’t be able to run that specific installation on a Mac. You can run Polar2Grid on a Mac, but we do not provide an all-in-one installation package like we do for our linux users. We have instructions on our documentation website for installing the individual python packages (does not include corrected reflectance software):
To do this on a mac I highly suggest using Anaconda or Macports or Homebrew to install a Python 2.7 environment and then run the commands mentioned in the documentation. Hope this helps.
andyprata commented Nov 6, 2015
Thanks for such a quick response–I suspected that it was because I’m not on Linux. I’ve tried installing polar2grid from source by running sudo python setup.py install in here:
/polar2grid-master/py/polar2grid and I get the following error:
Do you think this issue is related to my Enthought Canopy installation of python or something else?
djhoese commented Nov 7, 2015
@andyprata, do you plan on modifying the code? Otherwise, is there a reason you are installing from the source code? Do the installation instructions at the webpage I provided not work for you?
I highly recommend never installing python packages using «sudo». Almost every command used for installing python packages has a —user flag that can be added so you install packages in a
/.local directory. This way you don’t run things as root and you don’t modify the installed python environment. If you don’t need to modify the code I suggest installing things with the command from the webpage (with the added —user):
This should find all of the core packages at our SSEC server. The reason your command failed is that our Polar2Grid packages are not made available through the normal and public PyPI package repository. If you need to modify the code I would suggest you install from source using this command:
However, this will only install the main «polar2grid» package in development mode (edit the code and your installed package automatically uses these modifications), the other packages (polar2grid.core, polar2grid.viirs, etc) will be installed from the static packages on our server. You would have to install each package with a command like the above one at a time. If you do it this way then you wouldn’t need the -i URL flag since you would be installing all the polar2grid dependencies yourself.
andyprata commented Nov 7, 2015
At the moment I do not plan on modifying the code. I was installing from source because the installation instructions on the website did not work for me. Thanks for the tip–I will avoid using sudo in the future. However, I’m still getting errors:
djhoese commented Nov 8, 2015
I’m sorry this has been so difficult. It’s been a long time since I’ve actually tested these commands completely and it looks like some important things have changed with pip and how things need to be organized so they get installed. I was able to create a fresh environment with Anaconda (not needed for you since you have Canopy) and run this command to install everything:
There are a couple things I should note about this command. It does not install the dependencies for the «NinJo» backend because there were some complications getting those dependencies to install with this method. If you were intending to make NinJo compatible TIFF images with Polar2Grid let me know and I can go through the best way to get that working. It required some modifications on the server so thanks for pointing out that this doesn’t work. It may try to install the «gdal» package as a dependency if not already installed in Canopy (I’ve never used Canopy, sorry) and this library is very complex so it may give you trouble compiling/installing if pip tries to do it. You should then be able to run most polar2grid commands like this:
Let me know if any of this doesn’t work. Sorry again.
andyprata commented Nov 8, 2015
I really appreciate the support on this @davidh-ssec. I do not need NinJo compatibility and pip ran smoothly after running your suggested command. I’m still reading through the docs, but what would be a good «test» command to see if the code is running properly? I’ve tried this but I’m not sure if this means it’s working properly:
djhoese commented Nov 8, 2015
You’ll need to install the polar2grid.viirs package too (not automatically done with previous commands):
I think that the tarball you downloaded from the CSPP site should have some test data included that you should be able to run a simple command on. I was pretty sure the README came with instructions on the commands to run. You should be able to just swap out the parts about viirs2gtiff.sh with p2g_glue viirs gtiff . If not, I can find you some data to test with.
andyprata commented Nov 8, 2015
Awesome! Everything is working as expected now (I’ve installed polar2grid.viirs and polar2grid.modis ). And yes you’re right the README was easy to work through. Thank you so much for helping me out!
As an aside, I’ve also installed CentOS as a virtual machine (on VirtualBox) on my Mac, which I’m now using to generate corrected reflectance hdfs and GeoTIFFs (the true colour MODIS/VIIRS scripts are fantastic–thank you). Just out of curiosity, do you think crefl will be re-written for a Mac system in the future?
djhoese commented Nov 9, 2015
The crefl software is actually buildable on Mac (I develop P2G on mac). However, it depends on some libraries that don’t come with Mac by default so you usually have to get them from somewhere else. I’ll see if I can get you something that works (I’ll talk to some other people to see if I’m missing any options). If you want to try it yourself you can checkout the code and look at the modis_crefl and viirs_crefl directories. You should be able to run LDFLAGS=»-I
/opt/lib» make for both VIIRS and MODIS versions. You would need to replace
/opt/ with the location where you have HDF4, HDF5, libjpeg, zlib libraries installed (I think that’s all of them).
I’ll let you know if I find a better way to install them. In the future I hope to rewrite these programs in python so they can be more easily distributed.
andyprata commented Nov 9, 2015
A «pycrefl» would be great. I was able to compile crefl and cviirs . It was actually pretty straight forward with Macports. I used this command to install the dependencies:
Then from inside the modis_crefl and viirs_crefl directories I ran your suggested command with the appropriate paths for a Macports installation:
So now I’ve got Mac compiled executables for crefl and cviirs . I then copied them into $POLAR2GRID_HOME/bin and have overwritten the old executables. I then added the following to my bash_profile :
So now crefl (and cviirs ) are working:
I now wanted to see if I could use the crefl frontend and gtiff backend to output the true colour geotiff of the following MODIS swath:
And I get the following error:
I’ve had a look through the crefl2gtiff_fail.log file and it seems that I’m not pointing to the right python path i.e. this line:
That directory does not exist. It should be looking in the the same bin directory as my python installation, right?
djhoese commented Nov 9, 2015
Oops sorry I forgot about the ancillary files. You can get the cviirs one here: http://www.ssec.wisc.edu/
You should also make sure that the crefl executables are on your PATH and then you can set the base path for the ancillary files with P2G_CVIIRS_ANCPATH and P2G_CMODIS_ANCPATH . Also note that the cviirs program comes with an additional executable h5SDS_transfer_rename , this also has to be discoverable on your PATH. I would suggest either pointing your PATH to the build directories in your checked out version of the code where you compiled them or copying them somewhere outside of the original tarball you downloaded (to avoid confusion). You also don’t need to use the POLAR2GRID_HOME environment variable since you are using the p2g_glue command directly and setting up your own python environment. It looks like you know some stuff about using the command line so I’m hoping the stuff about PATH makes sense.
andyprata commented Nov 9, 2015
Ah ok! I think I’m very close. I’ve added crefl and cviirs to my PATH. I’ve also set the ancillary files using P2G_CVIIRS_ANCPATH and P2G_CMODIS_ANCPATH . Everything runs smoothly now with:
However, I still don’t have that illusive true colour tiff:
So I tried this (because now I have the corrected reflectance hdfs):
But I get this error:
I checked the log file and here’s where it gets stuck:
Update:
After a more careful read through of the docs I was able to output the 250 m true colour GeoTIFF with:
Thanks again @davidh-ssec for helping me out on this! Now I can run everything on my Mac.
Источник
Question: Q: /bin/bash: cannot excute binary file
I was changing paths and I think I screwed up. My terminal shows
«/bin/bash: /bin/bash: cannot execute binary file»
MacBook Pro, Mac OS X (10.6.8)
Posted on Jun 27, 2011 3:45 PM
Helpful answers
/opt . I guess that’s something created by or for macports. Personally I would use /usr/local/bin.
I’m still curious what wrong with your original /bin/bash. If you can put your version of bash most anywhere and it executes ok then I would be wondering what happened to the original /bin/bash. Do the following two terminal commands and post the results:
file /bin/bash
ls -l /bin/bash
Jun 29, 2011 12:59 AM
and use it to extract a fresh copy of bash from your installation DVD
/opt/local is where MacPorts.org puts its stuff, just as Fink.sf.net puts its stuff in /sw. In both cases it means they do not interfere with typical open source installations. You as a user get to choose via your PATH, shell aliases, shell functions, and personal shell scripts which version of a package you use (MacPorts, Fink, Open Source, Mac OS X).
But as has been suggested, you do not really want to replace anything normally installed by Mac OS X, as you never know if it is exactly the same as what was there, and if Mac OS X has some script it needs during normal operation that would break if you replace the Mac OS X version.
And with that in mind, and considering the importances of ‘bash’ it might be very wise to either use Pacifist, or reinstall Mac OS X so that you have a clean ‘bash’ copy.
Источник
cannot execute binary file: Exec format error #1112
Comments
crafy commented Oct 28, 2016
succesful install brew.
using brew install softwere, such as skewer, it came out:
skewer
bash: /home/xuye266/.linuxbrew/bin/skewer: cannot execute binary file: Exec format error
system: windows subsystem linux(ubuntu 14.04)
info in /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 69
model name : Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz
stepping : 1
microcode : 0xffffffff
cpu MHz : 2501.000
cache size : 256 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 6
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse
sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr p
dcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave osxsave avx f16c rdrand
bogomips : 5002.00
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 69
model name : Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz
stepping : 1
microcode : 0xffffffff
cpu MHz : 2501.000
cache size : 256 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 6
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse
sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr p
dcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave osxsave avx f16c rdrand
bogomips : 5002.00
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 69
model name : Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz
stepping : 1
microcode : 0xffffffff
cpu MHz : 2501.000
cache size : 256 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 6
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse
sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr p
dcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave osxsave avx f16c rdrand
bogomips : 5002.00
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 69
model name : Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz
stepping : 1
microcode : 0xffffffff
cpu MHz : 2501.000
cache size : 256 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 6
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse
sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr p
dcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave osxsave avx f16c rdrand
bogomips : 5002.00
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
The text was updated successfully, but these errors were encountered:
Источник