Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am running on Ubuntu 12.04 LTS and am trying to install NX. When using a sudo dpkg command for the plugin (nxplugin_3.5.0-6_i386.deb) I get an error.

I have tried a number of things. Other packages seemed to work but not this one. I have looked around quite a bit and it sounds like it might have something to do with the /var/lib/dpkg/status file but all I see in Line 6 of that is:

Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>

Here is the error:

sudo dpkg -i nxplugin_3.5.0-6_i386.deb
dpkg: error processing nxplugin_3.5.0-6_i386.deb (--install):
 parsing file '/var/lib/dpkg/tmp.ci/control' near line 6 package 'nxplugin':
 blank line in value of field 'Maintainer'
Errors were encountered while processing:
 nxplugin_3.5.0-6_i386.deb

Any help is appreciated. Thanks,

Jeff

share|improve this question
    
Where did you download the deb file from? –  Anwar Shah Sep 22 '12 at 19:18
    
what is your architecture 64bit or 32? –  user61928 Sep 27 '12 at 9:31
add comment

2 Answers

up vote 2 down vote accepted

You can easily edit the Control file to work around this. Open gedit or nano and type or paste:

#!/bin/bash

if [[ -z "$1" ]]; then
  echo "Syntax: $0 debfile"
  exit 1
fi

DEBFILE="$1"
TMPDIR=`mktemp -d /tmp/deb.XXXXXXXXXX` || exit 1
OUTPUT=`basename "$DEBFILE" .deb`.modfied.deb

if [[ -e "$OUTPUT" ]]; then
  echo "$OUTPUT exists."
  rm -r "$TMPDIR"
  exit 1
fi

dpkg-deb -x "$DEBFILE" "$TMPDIR"
dpkg-deb --control "$DEBFILE" "$TMPDIR"/DEBIAN

if [[ ! -e "$TMPDIR"/DEBIAN/control ]]; then
  echo DEBIAN/control not found.

  rm -r "$TMPDIR"
  exit 1
fi

CONTROL="$TMPDIR"/DEBIAN/control

MOD=`stat -c "%y" "$CONTROL"`
vi "$CONTROL"

if [[ "$MOD" == `stat -c "%y" "$CONTROL"` ]]; then
  echo Not modfied.
else
  echo Building new deb...
  dpkg -b "$TMPDIR" "$OUTPUT"
fi

rm -r "$TMPDIR"

Same the file as debedit.sh, and make it executable with chmod +x debedit.sh.

Then, run debedit.sh nxplugin_3.5.0-6_i386.deb for the file, and edit the correct line (or add it). Save, and then run sudo dpkg -i nxplugin_3.5.0-6_i386.deb.modified.deb (the name may differ a bit), and enjoy!

Source: http://ubuntuforums.org/showthread.php?t=636724

share|improve this answer
    
Thanks FOSS, That worked for me. Quite a re-education. Just a couple of notes for those that may hit this snag too. I had to mod the 777 the permissions of the folder I was working from with the nxplugin file and script. The name DID differ. In the script it is named modfied (no I) instead of modIfied. Simple stuff once you know what works or if you are more familiar than me, but easy to miss. Once I got the nxplugin_3.5.0-6_i386.deb file to edit and save (./debedit.sh nxplugin_3.5.0-6_i386.deb) , just put a space and period in all blank lines and esc + wq! and it ran. Thanks very much! Jeff –  Jeff Sep 22 '12 at 21:49
add comment

Sounds like the package is broken (technical: the control file is invalid). Maybe you could ask the author of the package to fix it.

share|improve this answer
    
Hi Florian, I am afraid that might be the case, I have used this and an older version before. Does this mean that there is a change it the package rules? I will check with the author but I could find no one else reporting this so I thought it might be something else. Any other way around going back to the vendor? –  Jeff Sep 22 '12 at 19:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.