# unmerged com_err, how screwed am I?

## graphicsMan

Hi all -

I somehow unwittingly unmerged com_err on a remote machine.  I'm still logged in, but if I lose the connection I'll have no way of fixing this  :Sad:   I usually use ssh and scp for things, but since I'm missing libcom_err, I can't ssh.  I don't have com_err anywhere on the machine in question, but I could easily copy it (just long enough to re-emerge it) from another machine... if I could figure out how.  I'm trying rcp but I can't do rsh... connection refused.  I've tried mucking with xinetd/rsh and pam.d/rsh and adding a .rhosts, but it doesn't seem to work.  Anyone knowledgeable want to chime in?

Thanks!

----------

## graphicsMan

I should note that com_err seems necessary for both ssh and wget, and I don't have ftp installed.  I DO have rcp, but can't get it to work.

----------

## pappy_mcfae

Now would be the time to hop into your car and go to the machine to emerge com_err from the machine itself.

Blessed be!

Pappy

----------

## graphicsMan

I was afraid of that.

Thanks.

----------

## desultory

 *pappy_mcfae wrote:*   

> Now would be the time to hop into your car and go to the machine to emerge com_err from the machine itself.

 Why, unless the ssh session died?

----------

## xtz

 *graphicsMan wrote:*   

> I should note that com_err seems necessary for both ssh and wget, and I don't have ftp installed.  I DO have rcp, but can't get it to work.

 Do you have the com_err package in /usr/portage/distfiles  :Question:  If not, can you use sftp / lynx/links to get the file from somethere  :Question: 

----------

## graphicsMan

Unfortunately any of the s* commands don't work without the library, so no sftp.  Alas I don't have ftp or lynx or links installed.  Truly, I shish.

I also had checked the distfiles, which DID have a tbz for the library, but alas it was corrupted :/.

My connection is still open, but I fear that I will need a physical presence to get the machine fixed.  Time to call a colleague  :Smile: 

Thanks for the ideas everyone.

----------

## pigeon768

I'm not sure I understand: You have a remote server that's connected to the internet. You have a local computer that's also connected to the internet. You have an SSH connection open, allowing you to execute commands on the remote server. On the remote server, you need to acquire a file. You cannot open any new connections to the remote server, besides the ssh connection you already have open.

Is this correct? Why not just use wget?

----------

## graphicsMan

Absolutely I'd love to.  It seems that wget is also reliant up on libcom_err.so  :Sad: 

----------

## graphicsMan

I just found this:

http://www.odi.ch/weblog/posting.php?posting=524

----------

## graphicsMan

In case this helps anyone, I re-emerged wget with USE="-ssl -nls" and it no longer depends on libcom_err  :Smile: 

Woot!

----------

## pappy_mcfae

 *desultory wrote:*   

>  *pappy_mcfae wrote:*   Now would be the time to hop into your car and go to the machine to emerge com_err from the machine itself. Why, unless the ssh session died?

 

It was my impression that such was the case...that the session had died and there was nothing he could do.

Blessed be!

Pappy

----------

## pigeon768

Well, now that you've solved your problem, you could also emerge the new e2fsprogs and e2fsprogs-libs as outlined in this thread. (but seriously, who reads stickies nowadays?)

----------

## Hu

Given sufficient time and persistence, you could have uploaded the file to the system by encoding it on the local machine, running a decoder on the remote machine with stdin attached to the terminal and stdout pointed at a file, and then pasting the encoded content into the ssh window.  This would be slow and manual, but if the server is far enough away, it still works out to be easier.

If port forwarding were permitted, you could simplify this by directing ssh to forward a port from the remote machine to the local, and connecting /bin/cat to the port on the remote end.  You would then run a server locally that prints the file to its client.  When the remote cat connects over the forward, it will be streamed the file, which it can then write to the remote disk.

----------

## RayDude

Or you can download the package with another computer, put it on a USB key and then copy it off the key with the computer that needs it.

Or you can emerge the old comm_err, fetch the new one and then start over.

----------

## Hu

 *RayDude wrote:*   

> Or you can download the package with another computer, put it on a USB key and then copy it off the key with the computer that needs it.
> 
> Or you can emerge the old comm_err, fetch the new one and then start over.

 

The first solution requires physical proximity, which he does not have.  The second assumes he still has the source for the old version, since he initially said wget was broken.

----------

## RayDude

 *Hu wrote:*   

>  *RayDude wrote:*   Or you can download the package with another computer, put it on a USB key and then copy it off the key with the computer that needs it.
> 
> Or you can emerge the old comm_err, fetch the new one and then start over. 
> 
> The first solution requires physical proximity, which he does not have.  The second assumes he still has the source for the old version, since he initially said wget was broken.

 

On the second point, chances are he still has the source since he had previously merged it.

----------

