简体   繁体   中英

Problem with flyway on raspbian: Cannot execute binary file: Exec format error

I am trying to run flyway on a raspberry pi without luck. I have downloaded and linked the program correctly but when I try to run it (migrate, -version, whatever) it fails with the error message /usr/local/bin/flyway: line 72: /home/pi/flyway-6.3.1/jre/bin/java: cannot execute binary file: Exec format error . I have searched the web for a while now but haven't been able to find any case of a similar error. I'm guessing it has something to do with the system architecture, but am I screwed or is there some kind of a workaround?

uname -a
Linux raspberrypi 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux

Thanks!

You are absolutely correct about it being an architecture issue. The jre/bin/java file you have is complied for x86-64 (a modern Intel or AMD desktop/server processor), and your system is a armv71. So you will be unable to run the incorrect version of the JVM.

The next question is how was the incorrect jre installed on your machine. How did you install it? What do you mean "linked the program"?

To answer your broader question, are you screwed? Probably not. Java exist for the arm architectures. It becomes a question, of exactly which version of Java do you need, and setting it up correctly. It could take some time. You should create an issue/feature request for arm architecture support. (don't be surprised if they never do this) this is the line where they assume you will be using x86

I would recommend virtual box, and Ubuntu for a data base migration tool. If you really need to run this tool in an embedded environment, I would be fascinated. Virtual box will allow you do set a x86-64 linux machine, and download with a graphical interface, then you can setup flyway on that.

Let us know what you plan to do.

I had this issue too. I couldn't find any solution but at the end I tried crazy hack and worked like a charm.

  1. Install default-jdk to raspberry
  2. Delete flyway/jre/bin/java file
  3. Re run flyway

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM