LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 11-17-2012, 02:08 PM   #46
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-19-live-usb/ aix
Posts: 3,560

Rep: Reputation: 520Reputation: 520Reputation: 520Reputation: 520Reputation: 520Reputation: 520

the command should be:
Code:
ln -s /usr/bin/gunzip /usr/bin/uncompress
perhaps you shouldnt be logged in as root; since you dont really know what you are doing and you are bound to seriousely screw up your system.

look into using sudo instead.
 
1 members found this post helpful.
Old 11-17-2012, 02:11 PM   #47
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,970

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
Quote:
Originally Posted by schneidz View Post
...
perhaps you shouldnt be logged in as root; since you dont really know what you are doing and you are bound to seriousely screw up your system.
...
+1

Markus
 
Old 11-17-2012, 02:16 PM   #48
carltonp
Member
 
Registered: Nov 2012
Posts: 69

Original Poster
Rep: Reputation: Disabled
schneidz

Its OK as the workstation is just being used as a lab.

Anyway after running the symlink a ran the commands again but it still didn't work. see below:

Quote:
[root@localhost /]# sudo yum install compress uncompress ncompress
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
No package compress available.
No package uncompress available.
No package ncompress available.
Error: Nothing to do
[root@localhost /]#
 
Old 11-17-2012, 02:36 PM   #49
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-19-live-usb/ aix
Posts: 3,560

Rep: Reputation: 520Reputation: 520Reputation: 520Reputation: 520Reputation: 520Reputation: 520
you should look into what those commands are doing. ln creates links between files. since no-one knows how to install uncompress on redhat we are subsituting it with gunzip (it probably handles the same format that compress uses).

at this point download the file again (do not use ftp and do not attempt to modify or edit the file in any way) then run ./DBConfig_RHEL_SAM_10_0_R5.bin to execute it and post the command and any error or output in you next response.

if you must use ftp then be certainly sure that you enable binary mode when you transfer it. ask the author of the file if they have any sha1 or md5 checksum that you can use to verify the integrity of the downloaded file.
 
Old 11-17-2012, 02:43 PM   #50
carltonp
Member
 
Registered: Nov 2012
Posts: 69

Original Poster
Rep: Reputation: Disabled
OK, going to download it again now...
 
Old 11-17-2012, 02:49 PM   #51
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,970

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
[off topic]This thread should be renamed "blind flight on RedHat"[/off topic]

@carltonp: we're happy to help people with their Linux-systems, but I would strongly recommend that you (besides asking here) RTFM the manpages. Read the documentation for your distribution!

Markus
 
1 members found this post helpful.
Old 11-17-2012, 03:04 PM   #52
carltonp
Member
 
Registered: Nov 2012
Posts: 69

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by markush View Post
[off topic]This thread should be renamed "blind flight on RedHat"[/off topic]

@carltonp: we're happy to help people with their Linux-systems, but I would strongly recommend that you (besides asking here) RTFM the manpages. Read the documentation for your distribution!

Markus
Markus, duly noted.

In the meantime, I have ftp'd the file again in binary mode. When I run file I get the following:

Code:
[root@localhost finally]# ./DBConfig_RHEL_SAM_10_0_R5.bin
bash: ./DBConfig_RHEL_SAM_10_0_R5.bin: Permission denied
[root@localhost finally]#
 
Old 11-17-2012, 03:12 PM   #53
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-19-live-usb/ aix
Posts: 3,560

Rep: Reputation: 520Reputation: 520Reputation: 520Reputation: 520Reputation: 520Reputation: 520
Quote:
Originally Posted by carltonp View Post
Markus, duly noted.

In the meantime, I have ftp'd the file again in binary mode. When I run file I get the following:

Code:
[root@localhost finally]# ./DBConfig_RHEL_SAM_10_0_R5.bin
bash: ./DBConfig_RHEL_SAM_10_0_R5.bin: Permission denied
[root@localhost finally]#
please post the output of
Code:
ls -l DBConfig_RHEL_SAM_10_0_R5.bin
chmod 744 DBConfig_RHEL_SAM_10_0_R5.bin
ls -l DBConfig_RHEL_SAM_10_0_R5.bin
./DBConfig_RHEL_SAM_10_0_R5.bin
 
Old 11-17-2012, 03:57 PM   #54
carltonp
Member
 
Registered: Nov 2012
Posts: 69

Original Poster
Rep: Reputation: Disabled
The following is the output from the commands you suggested...

Quote:
[root@localhost finally]# ls -l DBConfig_RHEL_SAM_10_0_R5.bin
-rw-r--r-- 1 root root 442314520 Nov 18 15:58 DBConfig_RHEL_SAM_10_0_R5.bin
[root@localhost finally]# chmod 744 DBConfig_RHEL_SAM_10_0_R5.bin
[root@localhost finally]# ls -l DBConfig_RHEL_SAM_10_0_R5.bin
-rwxr--r-- 1 root root 442314520 Nov 18 15:58 DBConfig_RHEL_SAM_10_0_R5.bin
[root@localhost finally]# ./DBConfig_RHEL_SAM_10_0_R5.bin
bash: ./DBConfig_RHEL_SAM_10_0_R5.bin: /bin/sh^M: bad interpreter: No such file or directory
 
Old 11-17-2012, 04:03 PM   #55
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,970

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
Well, that's really a problem with the the Linefeed.

you could use the following command to convert the file:
Code:
sed 's/^M$//' DBConfig_RHEL_SAM_10_0_R5.bin > newfile.bin
Afterwards make newfile.bin executable as you did above and then execute it. The problem is simply that the "^M" has to be deleted at the end of line.

Markus
 
Old 11-17-2012, 04:23 PM   #56
carltonp
Member
 
Registered: Nov 2012
Posts: 69

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by markush View Post
Well, that's really a problem with the the Linefeed.

you could use the following command to convert the file:
Code:
sed 's/^M$//' DBConfig_RHEL_SAM_10_0_R5.bin > newfile.bin
Afterwards make newfile.bin executable as you did above and then execute it.

Markus
Markus, thanks for helping out. How do I make newfile.bin an executable?
 
Old 11-17-2012, 04:25 PM   #57
carltonp
Member
 
Registered: Nov 2012
Posts: 69

Original Poster
Rep: Reputation: Disabled
Markus,

Silly question. I know how to make it an executable.

Anyway, I'm getting the following error message.

Quote:
[root@localhost finally]# ./newfile.bin
bash: ./newfile.bin: Permission denied
 
Old 11-17-2012, 04:28 PM   #58
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,970

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
permission denied means that it is not executable, do
Code:
chmod 744 newfile.bin
Markus
 
Old 11-17-2012, 04:41 PM   #59
carltonp
Member
 
Registered: Nov 2012
Posts: 69

Original Poster
Rep: Reputation: Disabled
Hi Mark

Thanks again for responding, I'm now getting the following after running the chmod:

Quote:
[root@localhost finally]# ./newfile.bin
bash: ./newfile.bin: /bin/sh^M: bad interpreter: No such file or directory
 
Old 11-17-2012, 04:43 PM   #60
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,970

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
What happens when you execute it as
Code:
bash newfile.bin
Markus
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Converting a binary file from little endian to big endian jaepi Programming 6 09-05-2011 09:51 PM
'Cannot Execute Binary File' issue kickout Linux - Software 4 09-16-2010 10:54 PM
Tar archive from windows to linux, binary file issue jblevins Linux - General 3 04-13-2009 11:50 PM
converting a hex file to binary linx win Programming 3 07-20-2006 03:04 AM
j2sdk installation issue - cannot execute binary file mcolley73 Linux - Software 2 04-18-2004 12:40 PM


All times are GMT -5. The time now is 10:36 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration