package: can't open config file /home/test/.mailagent

Asked by Lloyd Summers

Hello everyone,

First off - I apologise in advance for the length of this. I've only been using Linux for a few days. I originally installed Ubuntu 9.10 and the Package command word fine for me. I upgraded to 10.04 and decided to uninstall and re-install my work software to check if its compatible (for others) and I cannot. First I tried to use Manage 3rd Party Software - but all of the entries are missing from it. So I moved on to Terminal. I receive an error message now inside of Terminal using "package" commands. No matter what I use (Package install, Package remove, etc) I receive an error message.

For example when I try to install a software package:
  sudo package install "SMART Product Drivers 10.package"
  Reply: package: can't open config file /home/test/.mailagent

If I type in just
  package
  Reply: package: can't open config file /home/test/.mailagent

Same response. So I uninstalled the mailagent:
  package: can't open config file /home/test/.mailagent

Which went as expected and re-ran my installer
  sudo package install "SMART Product Drivers 10.package"
  Reply: sudo: package: command not found

So I re-installed the mailagent
  sudo apt-get install mailagent

Reply: Setting up mailagent (1:3.1-65-2) ...

              Hmmm.. You don't seem to have an /etc/news/organization file.
              Usually that contains the name of your organization as
              you want it to appear on the Organization line of outgoing
              articles/patches.

I saw this message when I was on 9.10 at some point so I wasn't worried. I tried to install again anyway:
  sudo package install "SMART Product Drivers 10.package"
  Reply: package: can't open config file /home/test/.mailagent

So I went ahead and created a dummy /etc/news/organization file with the entry 'None'
  sudo gedit /etc/news/organization
  None - file - save - exit

So I gave the mailagent another go:
  sudo apt-get remove mailagent
  sudo apt-get install mailagent

The re-install didnt mention the /etc/news/organization file. But when I try to install:
  sudo package install "SMART Product Drivers 10.package"
  Reply: package: can't open config file /home/test/.mailagent

Same error.

-----------------

Whats interesting, is checking my Fedora and Debian builds - I can't see a /home/test/.mailagent file or folder to copy either. At this point I can't remove the current package because my 'Manage 3rd party software' is 'blank'.

The only thing I can think of is I have never setup an email account on my system (I've only been using it for a few days). Anyway, I'm not sure exactly whats happening but I am welcome to any and all suggestions.

Thank you for your patience,

Question information

Language:
Spanish Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Lloyd Summers
Solved:
Last query:
Last reply:
Revision history for this message
Lloyd Summers (kermed) said :
#1

Well, one new discovery.

MailAgent includes a command called Package. Which seems to have replaced my autopackage command called Package.

man package

PACKAGE(1) PACKAGE(1)

NAME
package - register package user via mailagent

SYNOPSIS
package address system version patchlevel [ mailpatches | notifypatches
]

DESCRIPTION
This command is not intended to be run directly by a user, but may
appear in any mail whose subject is set to Command. Such mail will be
processed by the mailagent(1), which will extract all lines beginning
with @SH, which may specify this command. The mailagent first sets
environment variables that will be used by the command.

Which helps. so I removed the package again:

Apt-get remove mailagent

Now, how do I re-install autopackage I wonder. Back to google!

Revision history for this message
Lloyd Summers (kermed) said :
#2

Figured it out.

Problem:

Running .package files directly results in error messages that all .package files are corrupted. Running the PACKAGE command in terminal generates the following error:

    package: can't open config file /home/test/.mailagent

Where test is your username.

Cause:

When upgrading your operating system or through regular usage you may accidentally install MailAgent. This MailAgent contains a Package command that conflicts with the previous package command.

First we need to remove the MailAgent which installed a new package file causing the problem. Then we need to initiate a re-download of autopackage. Autopackage cannot be launched from the repository at this time.

Solution:

Step 1- Launch Terminal
 Enter: sudo apt-get remove MailAgent

MailAgent uninstalls and removes the faulty package command with it.

Step 2- Download the following package to your ~/Downloads/autopackage folder
 http://autopackage.googlecode.com/files/autopackage-1.4.2-x86.tar.bz2
 *Note: This will install the PACKAGE command again

Step 3- Extract it to ~/Downloads/autopackage
 *Note: You can place this somewhere else if needed

Step 4- Switch to Terminal
 Enter: cd ~/Downloads/autopackage

Step 5- Enter: sudo ./install
 Enter your Password

It will attempt to install the GUI which will likely fail on the URL's

Step 6- Enter: package

You should see the regular package command.

Step 7- Download the following package to your ~/Downloads/autopackage folder
 http://autopackage.googlecode.com/files/autopackage-gtk-1.4.2.package
 *Note: This installs your GUI again

Step 8- Switch to Terminal
 Enter: sudo package install autopackage-gtk-1.4.2.package

You should now have your full auto-package re-installed. Including support for 3rd Party Applications and Removal.