LinuxQuestions.org
Help answer threads with 0 replies.
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, 08: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, 12:06 PM   #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, 02:33 PM   #3
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50
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, 02: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, 03: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


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



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 10:44 AM
LXer: Debian/Ubuntu Package management Using dpkg LXer Syndicated Linux News 0 04-19-2007 10:47 PM
dpkg wont install gmail-notify b/c depends on obselete python package baldy1324 Debian 3 08-11-2006 05: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 12:12 PM
Is there any way to display the full name of package via dpkg -l <package pattern> ? davidas Debian 4 04-07-2004 11:00 PM


All times are GMT -5. The time now is 04:50 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration