2

This is copy from question of some guy on other forum that never got satisfiably answered.

I encountered the same error few days ago on Ubuntu 13.04 Desktop. It seems like Red5 is installed but it cannot be run for some reason. Can anyone explain what is going on here? Why should dpkg fail? I mean, this is checked repo, it should work fine.

apt-get install red5-server
Selecting previously deselected package red5-server.
(Reading database ... 53491 files and directories currently installed.) Unpacking red5-server (from .../red5-server_0.9.1-4squeeze1_all.deb) ...
Setting up red5-server (0.9.1-4squeeze1) ...
Starting Flash streaming server : red5-server failed!
invoke-rc.d: initscript red5-server, action "start" failed.
dpkg: error processing red5-server (--configure):
subprocess installed post-installation script returned error exit status 1
configured to not write apport reports
Errors were encountered while processing:
red5-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Logfile error.log in /usr/share/red5/log was completely empty. Other logs were not but according to them, there were no problems at all.


I solved the problem, but I doubt that other people to whom the same happens will be happy with the solution. I tried everything I know, then I lost my nerves and reinstalled whole Ubuntu.

Put on Ubuntu server 12.10.
I discovered that Ubuntu 13 is not quite stable, and must admit that I am somewhat angry with the developers. Well, on Ubuntu 12.10 I did:

# apt-get install red5-server

without getting java in advance, and everything went fine. But afterwards I succeeded only to run the Red5 HTTP server, but any demo i tried to run never connected to it and never played any VOD.
In fact, I tried to install adminpanel plugin, but this crashed whole Red5 and it was unable to start.
I deleted the plugin, and Red5 started again normally. Finally I went mad and gave up on Red5. Installed Flumotion instead and cannot tell that I have more success with it.

Nevertheless it would be nice if someone finally give us the real answer to the question.

fossfreedom
  • 174,526
Dalen
  • 31

2 Answers2

1

Installing a server has nothing to do with luck. Either it works or not. Software isn't magic. For this reason, first force to finish the installation, because with a broken package system you can't install other needed packages, if they are needed.

After that, you can solve the server start problem.


In a fresh Ubuntu 15.10 Wily (VM) installation is nothing more to do than

sudo apt-get install red5-server

All needed dependencies will be installed correctly. If you do not trust me, then I install Ubuntu again and give you the full output of the installation. ;)


However, if problems occur in an installation script, in your case in

/var/lib/dpkg/info/red5-server.postinst

then it is always a good idea to take a look at the script. If there is this line

set -e

replace with

# set -e

and run

sudo apt-get install -f

or find, where the server will be started, something like

invoke-rc.d red5-server start

and comment out the start procedure. And run

sudo apt-get install -f

Then you'll need to find out why the server fails to start, but the installation can be completed.

A.B.
  • 92,125
1

Quick way

Here is the closed upstream bug report: Installation fails on Ubuntu 14.04 #29 seem the deb package is not updated and the original author suggest using the upstream tarball. He also mentioned:

If anyone knows how to update the .deb stuff, let us know and we will take care of it.

Follow the accepted answer in Ubuntu Trusty red5-server installation fails to start which contains the instructions to install the upstream package.


The problem was due failing to start service:

Starting Flash streaming server : red5-server failed!
invoke-rc.d: initscript red5-server, action "start" failed.

As mentioned in A.B.'s answer #set -e is the quickest solution to let installation complete as it possible to comment only the service related commands in postinst script:

#invoke-rc.d red5-server start || exit $?

As 12.10/13.04 are not LTS and no longer supported here. I test it on a fresh Ubuntu 14.04. All source component are active (main, universe, multiverse, restricted).

  1. Update package list

    sudo apt-get update
    
  2. Trying to install red5-server

    sudo apt-get install red5-server

    [sudo] password for user: 
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     red5-server : Depends: libtomcat6-java (>= 6.0.20-7) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    
  3. So install libtomcat6-java first:

    sudo apt-get install libtomcat6-java
    
  4. Then install red5-server

    sudo apt-get install red5-server
    

Here is the full log. The installation passed ok after I have installed libtomcat6-java ,

However the red5-server service stopped/killed just a second after starting it and most of the tries was failing to start.

user@user-14-sudo:~$ sudo service red5-server status
[sudo] password for user: 
 * Checking status of Flash streaming server red5-server                 [fail] 

user@user-14-sudo:~$ sudo service red5-server start
 * Starting Flash streaming server  red5-server                          [ OK ] 

user@user-14-sudo:~$ sudo service red5-server status
 * Checking status of Flash streaming server red5-server                 [fail] 

Even if the service started OK is will crash in a second. So I think my success to install it without error was just a luck. It's possible to raise an error if the service fail when started by postinst.

I looked around for similar case, there is many unresolved bug report raised for this:

user.dz
  • 49,176