Package not correctly deployed! Please reinstall the package

English! place to talk about development, programming and coding
Post Reply
ndhvu275
Znuny advanced
Posts: 139
Joined: 06 Nov 2012, 09:02
Znuny Version: 3.x, 4.x and 5.x
Real Name: Vu Nguyen
Company: INFOdation
Location: Netherlands
Contact:

Package not correctly deployed! Please reinstall the package

Post by ndhvu275 »

Hi,

I'm new in OTRS (2 weeks). I'm using OTRS version 3.1.13 (released), installed for Win (Win7). I'm try to do Hello World exmaple with guide book OTRS Developer. I've already finished all file like module (Hello World module) like below:
- Source file
- sopm file to install
- Do install via Web tool Package Manager, but the system shows an error (a general error): Package not correctly deployed! Please reinstall the package.
- Then, go to view otrs log file. It's written:
[Wed Nov 7 10:25:27 2012][Error][Kernel::System::Package::_FileInstall][2549] Content not defined in File!
[Wed Nov 7 10:25:27 2012][Error][Kernel::System::Package::_FileInstall][2549] Content not defined in File!
[Wed Nov 7 10:25:27 2012][Error][Kernel::System::Package::_FileInstall][2549] Content not defined in File!
[Wed Nov 7 10:25:27 2012][Error][Kernel::System::Package::_FileInstall][2549] Content not defined in File!
[Wed Nov 7 10:25:27 2012][Error][Kernel::System::Package::_FileInstall][2549] Content not defined in File!
[Wed Nov 7 10:25:27 2012][Notice][Kernel::System::Package::RepositoryGet] No such package: AgentHelloWorld-0.0.1!


It's seem not have permission for installing, I think. Do you have any ideal for this?

Please let me know what is exactly error?

Thanks & Regard,
Hoang Vu
OTRS 3.x, 4.x on CentOS/Windows
MySQL database
External customer backend with MySQL, MSSQL
Customization
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by reneeb »

Which files have you created? How did you create the OPM file? Can you attach the OPM file to this thread?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
ndhvu275
Znuny advanced
Posts: 139
Joined: 06 Nov 2012, 09:02
Znuny Version: 3.x, 4.x and 5.x
Real Name: Vu Nguyen
Company: INFOdation
Location: Netherlands
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by ndhvu275 »

reneeb wrote:Which files have you created? How did you create the OPM file? Can you attach the OPM file to this thread?
Hi,

First, thanks for your reply.

Source code files I created and place them on the working location, their structure directory like below:
Kernel/Config/File/HelloWorld.xml
Kernel/Language/de_AgentHelloWorld.pm
Kernel/Modules/AgentHelloWorld.pm
Kernel/Output/HTML/Standard/HelloWorld.dtl
Kernel/System/HelloWorld.pm

I've not yet created the OPM file, just is SOPM file (from SOPM build into OPM file). My problem was here, can not build!

Btw, I've try build via CMD for finding an error. The error seems around write permission from otrs.SetPermissions.pl (please view the attached file:ErrorCMD)
4rum not allow to attach sopm file, then I copied the content right here:
<?xml version="1.0" encoding="utf-8" ?>
<otrs_package version="1.1">
<Name>AgentHelloWorld</Name>
<Version>0.0.1</Version>
<Framework>3.1.x</Framework>
<Vendor>Hoang Vu</Vendor>
<URL>http://otrs.org/</URL>
<License>Hoang Vu PUBLIC LICENSE</License>
<ChangeLog Version="0.0.1" Date="2012-11-07 11:15:21">Create new</ChangeLog>
<Description Lang="en">Hello World</Description>
<Description Lang="de">Hello Weit</Description>
<IntroInstall Type="post" Lang="en" Title="Thank you!">Thank you for choosing the HelloWorld module.</IntroInstall>
<IntroInstall Type="post" Lang="de" Title="Vielen Dank!">Vielen Dank fuer die Auswahl des HelloWorld Modules.</IntroInstall>
<BuildDate>2012-11-07</BuildDate>
<BuildHost>http://localhost/otrs/</BuildHost>
<Filelist>
<File Permission="644" Location="D:/_OTRS/Kernel/Config/Files/HelloWorld.xml"></File>
<File Permission="644" Location="D:/_OTRS/Kernel/System/HelloWorld.pm"></File>
<File Permission="644" Location="D:/_OTRS/Kernel/Modules/AgentHelloWorld.pm"></File>
<File Permission="644" Location="D:/_OTRS/Kernel/Language/de_AgentHelloWorld.pm"></File>
<File Permission="644" Location="D:/_OTRS/Kernel/Output/HTML/Standard/HelloWorld.dtl"></File>
</Filelist>
</otrs_package>


Please help me.

Thanks & Regards,
Hoang Vu
You do not have the required permissions to view the files attached to this post.
OTRS 3.x, 4.x on CentOS/Windows
MySQL database
External customer backend with MySQL, MSSQL
Customization
ndhvu275
Znuny advanced
Posts: 139
Joined: 06 Nov 2012, 09:02
Znuny Version: 3.x, 4.x and 5.x
Real Name: Vu Nguyen
Company: INFOdation
Location: Netherlands
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by ndhvu275 »

Dear,

This error was found. Because I uploaded sopm file to install, it must be opm file. The sopm the file must be build into the opm file via cmd otrs.packagemanager.pl. So now, I don't understand this cmd not run. My cmd line line like below (CMD on Win):

c:\Program Files\otrs\otrs\bin>otrs.PackageManager.pl –a build –p d:\_OTRS\HelloWorld.sopm -o d:\_otrs\HelloWorld.opm

After run, don't see any error, but I didn't find the opm file. I also try to work around, but the results are the same

c:\Program Files\otrs\otrs\bin>otrs.PackageManager.pl –a build –p d:\_OTRS\HelloWorld.sopm

c:\Program Files\otrs\otrs\bin>otrs.PackageManager.pl –a build –p d:\_OTRS\HelloWorld.sopm writting d:\_otrs\HelloWorld.opm (in developer manual book)

c:\Program Files\otrs\otrs\bin>otrs.PackageManager.pl –a build –p d:\_OTRS\HelloWorld.sopm -o HelloWorld.opm

Anyone know that please help me

Thanks a lot,

Hoang Vu
OTRS 3.x, 4.x on CentOS/Windows
MySQL database
External customer backend with MySQL, MSSQL
Customization
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by reneeb »

Try

Code: Select all

c:\Program Files\otrs\otrs\bin>otrs.PackageManager.pl -a build -p d:\_OTRS\HelloWorld.sopm -d d:\_otrs\
And it should print where the opm is located...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
ndhvu275
Znuny advanced
Posts: 139
Joined: 06 Nov 2012, 09:02
Znuny Version: 3.x, 4.x and 5.x
Real Name: Vu Nguyen
Company: INFOdation
Location: Netherlands
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by ndhvu275 »

reneeb wrote:Try

Code: Select all

c:\Program Files\otrs\otrs\bin>otrs.PackageManager.pl -a build -p d:\_OTRS\HelloWorld.sopm -d d:\_otrs\
And it should print where the opm is located...
Dear reneeb,

Thanks for reply. Your cmd line also not run. However I realized that otrs.PackageManager.pl could not run for Win, I tested. Then, I run it on Linux is ok. Also, I tested some coding and install on otrs for win, something could not execute, OTRS maybe not support for win as well.

Thx,

Hoang Vu
OTRS 3.x, 4.x on CentOS/Windows
MySQL database
External customer backend with MySQL, MSSQL
Customization
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by reneeb »

Generally OTRS works on Windows as well. Can you be more specific about the errors you get?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
ndhvu275
Znuny advanced
Posts: 139
Joined: 06 Nov 2012, 09:02
Znuny Version: 3.x, 4.x and 5.x
Real Name: Vu Nguyen
Company: INFOdation
Location: Netherlands
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by ndhvu275 »

reneeb wrote:Generally OTRS works on Windows as well. Can you be more specific about the errors you get?
Hi reneeb,

Actually, I'm new for 2 weeks to work OTRS and Perl, I'm also not good on Linux OS. So, I try to create a HelloWorld module and install on OTRS for do example. During on it, I met 2 errors, I just guess the OTRS could not run on Win as well:
1. Using cmd line otrs.packagemanager.pl to build SOPM file into OPM file. Exactly cmd line I wrote above. But run it on Linux is ok. I'm thinking the codes in otrs,packagemanager.pl file is only run on Linux
2. After build on Linux seccessful into opm file, for example: HelloWorld.opm. I used it to install on OTRS (for Window), the BuildSelection function to build dropdownlist is not work. However I do the same on OTRS (for Linux) is also OK.

P/s: I'm using Win 7 and CentOS (on virual PC). Also setup OTRS on 2 OS.

May I wrong somewhere, please how let know for experiences on later times.

Thank so much

Hoang Vu
OTRS 3.x, 4.x on CentOS/Windows
MySQL database
External customer backend with MySQL, MSSQL
Customization
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by reneeb »

Can you post the output of the script when you build the .opm file? Can you post the SystemLog entries of OTRS that are written when you install your module?

If you say "it doesn't work" doesn't help. There are many things that can go wrong...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
ndhvu275
Znuny advanced
Posts: 139
Joined: 06 Nov 2012, 09:02
Znuny Version: 3.x, 4.x and 5.x
Real Name: Vu Nguyen
Company: INFOdation
Location: Netherlands
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by ndhvu275 »

reneeb wrote:Can you post the output of the script when you build the .opm file? Can you post the SystemLog entries of OTRS that are written when you install your module?

If you say "it doesn't work" doesn't help. There are many things that can go wrong...
Dear reneeb,

Here is the output when running on Win
Image

And here is the output when running on Linux
Image

Both of case, they did not have any system log when I installed module.

Rgds,

Hoang Vu
You do not have the required permissions to view the files attached to this post.
OTRS 3.x, 4.x on CentOS/Windows
MySQL database
External customer backend with MySQL, MSSQL
Customization
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by jojo »

you need to use / instead of \ also on windows
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by reneeb »

Perl can handle "\" as well. Furthermore, the code doesn't reach any code that has to do anything with IO. Can you add the following code to otrs.PackageManager.pl (right before "if ( $opts{h} ) {"):

Code: Select all

use Data::Dumper;
die Dumper \%opts;
Please post the output.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
ndhvu275
Znuny advanced
Posts: 139
Joined: 06 Nov 2012, 09:02
Znuny Version: 3.x, 4.x and 5.x
Real Name: Vu Nguyen
Company: INFOdation
Location: Netherlands
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by ndhvu275 »

reneeb wrote:Perl can handle "\" as well. Furthermore, the code doesn't reach any code that has to do anything with IO. Can you add the following code to otrs.PackageManager.pl (right before "if ( $opts{h} ) {"):

Code: Select all

use Data::Dumper;
die Dumper \%opts;
Please post the output.
Dear reneeb,

Here is the output after your guide. And the line 85 is "die Dumper \%opt;" coding
Image

Rgds,

Hoang Vu
You do not have the required permissions to view the files attached to this post.
OTRS 3.x, 4.x on CentOS/Windows
MySQL database
External customer backend with MySQL, MSSQL
Customization
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by reneeb »

Sorry, it was a typo. It should be "%Opts" instead of "%opts" (use a capital letter O).
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
ndhvu275
Znuny advanced
Posts: 139
Joined: 06 Nov 2012, 09:02
Znuny Version: 3.x, 4.x and 5.x
Real Name: Vu Nguyen
Company: INFOdation
Location: Netherlands
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by ndhvu275 »

reneeb wrote:Sorry, it was a typo. It should be "%Opts" instead of "%opts" (use a capital letter O).
Dear reneeb,

Here is the output
11-12-2012 3-38-09 PM.png
Thanks,
Hoang Vu
You do not have the required permissions to view the files attached to this post.
OTRS 3.x, 4.x on CentOS/Windows
MySQL database
External customer backend with MySQL, MSSQL
Customization
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by reneeb »

That's strange. It doesn't recognize your parameters...

Can you also add

Code: Select all

use Devel::Peek;
Dump \@ARGV;
(right after the code you added before)

Don't worry about the output. This shows some internal structure of Perl and this helps me to debug...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
ndhvu275
Znuny advanced
Posts: 139
Joined: 06 Nov 2012, 09:02
Znuny Version: 3.x, 4.x and 5.x
Real Name: Vu Nguyen
Company: INFOdation
Location: Netherlands
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by ndhvu275 »

reneeb wrote:That's strange. It doesn't recognize your parameters...

Can you also add

Code: Select all

use Devel::Peek;
Dump \@ARGV;
(right after the code you added before)

Don't worry about the output. This shows some internal structure of Perl and this helps me to debug...
Dear reneeb,

The output likes this:
11-12-2012 4-05-16 PM.png
Thanks for your time,

Hoang Vu
You do not have the required permissions to view the files attached to this post.
OTRS 3.x, 4.x on CentOS/Windows
MySQL database
External customer backend with MySQL, MSSQL
Customization
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by reneeb »

Even more strange... Have you changed anything in the script (beside the two code snippets I posted)?

Can you save this code as getopts.pl

Code: Select all

#!/usr/bin/perl

use strict;
use warnings;

use feature 'say';

use Getopt::Std;
use Data::Dumper;

my %Opts;
getopt( "haopd", \%Opts );
say Dumper [ \%Opts, \@ARGV ];
and run it with the same arguments as the package manager script?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
ndhvu275
Znuny advanced
Posts: 139
Joined: 06 Nov 2012, 09:02
Znuny Version: 3.x, 4.x and 5.x
Real Name: Vu Nguyen
Company: INFOdation
Location: Netherlands
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by ndhvu275 »

reneeb wrote:Even more strange... Have you changed anything in the script (beside the two code snippets I posted)?

Can you save this code as getopts.pl

Code: Select all

#!/usr/bin/perl

use strict;
use warnings;

use feature 'say';

use Getopt::Std;
use Data::Dumper;

my %Opts;
getopt( "haopd", \%Opts );
say Dumper [ \%Opts, \@ARGV ];
and run it with the same arguments as the package manager script?
Dear reneeb,

No, I have not changed anything. And here is result to be run with a new file getopts.pl, they seem nothing.
11-12-2012 4-29-15 PM.png
Thanks,
Hoang Vu
You do not have the required permissions to view the files attached to this post.
OTRS 3.x, 4.x on CentOS/Windows
MySQL database
External customer backend with MySQL, MSSQL
Customization
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by reneeb »

You should pass the same arguments to getopt.pl ("-a build -p ...")
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
ndhvu275
Znuny advanced
Posts: 139
Joined: 06 Nov 2012, 09:02
Znuny Version: 3.x, 4.x and 5.x
Real Name: Vu Nguyen
Company: INFOdation
Location: Netherlands
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by ndhvu275 »

reneeb wrote:You should pass the same arguments to getopt.pl ("-a build -p ...")
Hi reneeb,

It also sames above.
11-12-2012 4-53-57 PM.png
Thx,

Hoang Vu
You do not have the required permissions to view the files attached to this post.
OTRS 3.x, 4.x on CentOS/Windows
MySQL database
External customer backend with MySQL, MSSQL
Customization
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by reneeb »

What if you do

Code: Select all

perl getopts.pl -a build
or

Code: Select all

perl getopts.pl "-a" "build"
It seems your issue is related to http://stackoverflow.com/questions/4234 ... -windows-7
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
ndhvu275
Znuny advanced
Posts: 139
Joined: 06 Nov 2012, 09:02
Znuny Version: 3.x, 4.x and 5.x
Real Name: Vu Nguyen
Company: INFOdation
Location: Netherlands
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by ndhvu275 »

reneeb wrote:What if you do

Code: Select all

perl getopts.pl -a build
or

Code: Select all

perl getopts.pl "-a" "build"
It seems your issue is related to http://stackoverflow.com/questions/4234 ... -windows-7
Dear reneeb,

The output from your suggest, the both results are same.
11-13-2012 10-14-48 AM.png
Days ago I maybe lacked the prefix "perl" if want to run the perl script. I'd like the post again the output with running the packagemanager.pl with apply your

Code: Select all

use Data::Dumper;
die Dumper \%opts;
coding
The output
11-13-2012 10-09-43 AM.png
Hope it make you some ideas

Btw, I will read the solution you showed me

Thanks
Hoang Vu
You do not have the required permissions to view the files attached to this post.
OTRS 3.x, 4.x on CentOS/Windows
MySQL database
External customer backend with MySQL, MSSQL
Customization
ndhvu275
Znuny advanced
Posts: 139
Joined: 06 Nov 2012, 09:02
Znuny Version: 3.x, 4.x and 5.x
Real Name: Vu Nguyen
Company: INFOdation
Location: Netherlands
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by ndhvu275 »

reneeb wrote: It seems your issue is related to http://stackoverflow.com/questions/4234 ... -windows-7
Dear reneeb,

The above link is just the solution about the "perl "prefix has or not if running the perl script via cmd line. My perl environment is actually right, so if I want to run the perl script, then I just add the "perl" prefix is ok.

Thx

Hoang Vu
OTRS 3.x, 4.x on CentOS/Windows
MySQL database
External customer backend with MySQL, MSSQL
Customization
ndhvu275
Znuny advanced
Posts: 139
Joined: 06 Nov 2012, 09:02
Znuny Version: 3.x, 4.x and 5.x
Real Name: Vu Nguyen
Company: INFOdation
Location: Netherlands
Contact:

Re: Package not correctly deployed! Please reinstall the pac

Post by ndhvu275 »

Dear,

This issue was solved. So I'd like share with you what do you need during setup OTRS on Win

After setup the OTRS, there is Perl environment was created in c:\Program Files\OTRS\StrawberryPerl\Perl. Then, I also setup the activePerl (I want to update some new Perl modules), that means it also created one more Perla environment in C:\Perl. So, there were existed 2 Perl environment in PATH ENVIRONMENT VARIABLES, let see the picture. Then, you have to remove C:\Perl
11-19-2012 9-01-52 AM.png
Hope the solution will help you,

Regards,
Hoang Vu
You do not have the required permissions to view the files attached to this post.
OTRS 3.x, 4.x on CentOS/Windows
MySQL database
External customer backend with MySQL, MSSQL
Customization
Post Reply