LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 12-05-2007, 07:35 AM   #1
basis1980
LQ Newbie
 
Registered: Nov 2007
Posts: 15

Rep: Reputation: 0
Using Java to install a package with dpkg in Debian


I have got an interesting problem.

First I have to tell a little bit about the setting. I have a linux embedded device. I am using Debian with this device. I have made the necessary arrangements so that when I put a USB flash disk with a file update.jar in the USB flash, the device automatically run the command java -jar update.jar and do whatever necessary (create a directory, delete a file etc.).

This has been working like a charm till now. But now I have to install a package (openntpd) using this setting. In the update.jar java file I have the command:

/usr/bin/dpkg --install /media/usb0/openntpd.deb

I expect this to install the package without a problem when I put the USB flash stick. But it doesn't do that. However it does runs the other commands in the update.jar file.

So I suspect that the problem is related with dpkg command.

The interesting part is when I manually enter the command java -jar /media/usb0/update.jar into the console it does installs the package.

any ideas why this would be happenning?
 
Old 12-05-2007, 11:06 AM   #2
pentode
Member
 
Registered: Dec 2005
Location: Oregon
Distribution: Debian Testing
Posts: 488

Rep: Reputation: 38
Just guessing, but perhaps the .deb file is screwed up. dpkg expects to find the .deb file meeting the defined requirements. It gets cranky if something is missing or per spec.

Debian website has requirements for .deb file. I doubt the problem is in dpkg itself.
 
Old 12-05-2007, 01:33 PM   #3
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 59
Quote:
I have a linux embedded device. I am using Debian with this device.
Ok I know nothing about working with an embedded device, so my question is, does the device OS run as root or is there some kind of user. If its the later then I would say its a permission problem. You need root privilege for dpkg.
Just a shot in the dark.
 
Old 12-06-2007, 01:39 AM   #4
basis1980
LQ Newbie
 
Registered: Nov 2007
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mrrangerman View Post
Ok I know nothing about working with an embedded device, so my question is, does the device OS run as root or is there some kind of user. If its the later then I would say its a permission problem. You need root privilege for dpkg.
Just a shot in the dark.
this is also what I have in mind.. is there a way or a command that would allow me login as root? (I do not use a monitor or keyboard so I should directly run this command as a single line. such as "/bin/login user:root password:mypassword" sort of thing)..
 
Old 12-06-2007, 02:45 AM   #5
basis1980
LQ Newbie
 
Registered: Nov 2007
Posts: 15

Original Poster
Rep: Reputation: 0
I got the error stream now it gets worse:

dpkg - error: PATH is not set.

I thought the path for dpkg is /usr/bin/dpkg

any comments?
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help using dpkg to build and install debian packages Mahonri Linux - General 1 07-24-2007 09:44 AM
LXer: Debian/Ubuntu Package management Using dpkg LXer Syndicated Linux News 0 04-19-2007 09:47 PM
dpkg wont install gmail-notify b/c depends on obselete python package baldy1324 Debian 3 08-11-2006 04:56 PM
how to manually install a package when dpkg, apt-get are broken and system wont boot. hisnumber666 Linux - Software 17 05-02-2006 11:12 AM
Is there any way to display the full name of package via dpkg -l <package pattern> ? davidas Debian 4 04-07-2004 10:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:33 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration