Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Ok I am trying to install digichat for a customer but in the install script it uses LD_ASSUME_KERNEL=2.2.5 which is a workaround for redhat releasing broken glibc. Well anyway that ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer
    Join Date
    Jan 2003
    Location
    Lebanon, pa
    Posts
    994

    Sed problem.


    Ok I am trying to install digichat for a customer but in the install script it uses LD_ASSUME_KERNEL=2.2.5 which is a workaround for redhat releasing broken glibc. Well anyway that breaks a lot of other distros(i am using gentoo) because it causes binaries not to be able to find the correct libs. So I used sed to remove that from the install file but it seems to break gzip compressed files inside of it. This is the sed command I used:

    sed -e '1986s/LD_ASSUME_KERNEL=2.2.5//' Install_DigiChat.bin > digi.bin

    Anyone know of a way I can remove that line without corrupting the compressed files?

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Am I correct if I'm guessing that this DigiChat.bin is one of these shell scripts with an encapsulated tarball, and that you want to remove the LD_ASSUME_KERNEL lines before the tarball begins? In that case, just seperate the installer from the tarball with head and tail, run sed on the head part and then reassemble them with cat. That seemed too easy, though... was there anything else to it?

  3. #3
    Linux Engineer
    Join Date
    Jan 2003
    Location
    Lebanon, pa
    Posts
    994
    I've tried seperating it but the compressed files always seem to get corrupted.

  4. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    But if you seperate it, how can the compressed file be affected at all? How can sed touch it if you put it in a seperate file? I must be missing out on something.

  5. #5
    Linux Engineer
    Join Date
    Jan 2003
    Location
    Lebanon, pa
    Posts
    994
    I know but when I put the files back together, gzip won't decompress it then.

    gzip: /tmp/install.dir.26457/Linux/resource/vm.tar.Z: not in gzip format
    /tmp/install.dir.26457/Linux/resource/vm.tar.Z: not in compressed format

  6. #6
    Linux Engineer
    Join Date
    Jan 2003
    Location
    Lebanon, pa
    Posts
    994
    head -n 2218 Install_DigiChat.bin > i.bin
    sed -e 's/LD_ASSUME_KERNEL=2.2.5//' i.bin > i2.bin
    tail -n 153735 Install_DigiChat.bin > d2.bin
    cat i2.bin d2.bin > digi.bin

    omikron root # ./digi.bin
    Preparing to install...
    Extracting the JRE from the installer archive...
    Unpacking the JRE...

    gzip: /tmp/install.dir.26533/Linux/resource/vm.tar.Z: not in gzip format
    /tmp/install.dir.26533/Linux/resource/vm.tar.Z: not in compressed format

    gzip: /tmp/install.dir.26533/Linux/resource/vm.tar.Z: not in gzip format
    The included VM could not be uncompressed (GZIP/UNCOMPRESS). Please try to
    download the installer again and make sure that you download using 'binary'
    mode. Please do not attempt to install this currently downloaded copy.

  7. #7
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Ah, I get it, I think. I think these things have hardcoded offsets to where the compressed data begins. Try replacing the text with whitespace of the same length and see if that works.
    By the way, you can use "tail +2218" instead of "tail -n 153735". It might not work in the latest version of coreutils, though. I don't know why they've removed it, but they seem to have done so. You can still use "tail -n +2218*, at least.

  8. #8
    Linux Engineer
    Join Date
    Jan 2003
    Location
    Lebanon, pa
    Posts
    994
    Good idea I didn't think of that. Well it did work, now to work on the next error I get from it

    ./digi.bin: /tmp/install.dir.26698/Linux/resource/jre/bin/java: /bin/sh: bad interpreter: Permission denied

  9. #9
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Now that's an interesting one... I'd fall back on good old strace.

  10. #10
    Linux Engineer
    Join Date
    Jan 2003
    Location
    Lebanon, pa
    Posts
    994
    Yeah I fixed that error, I had /tmp mounted with noexec. After fixing that I have another error to fix:

    Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)

    Stack Trace:
    java.lang.NoClassDefFoundError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:115)
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvir onment(GraphicsEnvironment.java:53)
    at java.awt.Window.<init>(Window.java:183)
    at java.awt.Frame.<init>(Frame.java:310)
    at java.awt.Frame.<init>(Frame.java:257)
    at com.zerog.ia.installer.Main.c(Unknown Source)
    at com.zerog.ia.installer.Main.main(Unknown Source)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.zerog.lax.LAX.launch(Unknown Source)
    at com.zerog.lax.LAX.main(Unknown Source)
    GUI-

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •