Winexe installation in Linux - samba

I am trying to compile and build winexe. I have downloaded the samba source and ran the following command to compile the winexe.
./waf configure --samba-dir=../../samba --samba-inc-dirs=../../samba/ --samba-lib-dirs=../../samba/
I am getting the following error. Please suggest me to resolve the error.
[3326/3810] Compiling default/source/smb_static/smb_static.objlist.empty.c
Waf: Leaving directory `/root/samba/bin'
Build failed: could not find 'source/smb_static/smb_static.objlist.empty.c' for
{task: cc smb_static.objlist.empty.c -> smb_static.objlist.empty_2.o}
Checking for library smb_static : not found
Build of static winexe : disabled
Cannot continue! Please either install Samba shared libraries and re-run waf, or download the Samba source code and re-run waf with the "--samba-dir" option.
(complete log in /root/winexe/source/build/config.log)

execfile is deprecated,
edit the file "smb_static/wscript",
remove the line with execfile and use exec(open("wscript").read()) instead

Related

DAML Sand box error: Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' has value '1.8', but '1.7' is required

Getting below error when I start sandbox. I think we need use jdk8 as per the DAML doc.
daml sandbox --scenario Main:setup .daml/dist/quickstart-0.0.1.dar
Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'
has value '1.8', but '1.7' is required.
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
daml-helper: Received ExitFailure 2 when running
Raw command: java -jar "C:\Users\santh\AppData\Roaming\daml\sdk\0.13.21\sandbox/sandbox.jar" --scenario Main:setup .daml/dist/quickstart-0.0.1.dar
During my initial setup, I have faced the similar issue. It may be because of an existing Java installation in your machine.
You can try the below options to fix this issue.
Option 1:
1. Check if you have more than one version of JAVA in machine.
2. If yes, uninstall everything and do the clean installation. Make sure your Environment Path variable(s) are got set properly.
or
Option 2:
1) Download the latest JDK in Zip format "jdk-12.0.2_windows-x64_bin.zip"
2) Extract it manually in your local drive.
3) Manually update your Environment Path variables (ref. https://javatutorial.net/set-java-home-windows-10).
I hope it will help you to fix your problem.
Cheers,
Augustine

Error when trying to Scaffold a model

I'm building a Razor Page app using ASP.NET 2017. When I run the command
dotnet aspnet-codegenerator razorpage -m Activity -dc CongContext -udl -outDir Page\Activities --referenceScriptLibraries
This error appears:
Could not load file or assembly 'Microsoft.EntityFrameworkCore,
Version=2.0.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
The located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)
I stopped and restarted VS, I've also cleaned and build the solution. Attached jpg shows the code I typed and the results
This is because of different versions of packages. Check the 'Dependencies' node of your project. The Microsoft.EntityFrameworkCore and Microsoft.EntityFrameworkCore.Design must have same 2.0.3 versions.
If not, delete and re-add them from [Tools] menu > [Nuget Package Manager]. Also delete the Migrations folder and repeat instructions as listed here. For more info, you may take a look at this comment

MSDeploy gulp build package

Is it possible to deploy a Single Page App project build using grunt to IIS using MSDeploy from TeamCity? The project is not any kind of Visual Studio solution and doesn't get built using MSBuild.
My Command parameters which are not working are:
-source:package='%teamcity.build.checkoutDir%\Dist.%build.number%.zip' -dest:auto,computerName="%system.MsDeployServiceUrl%",userName="%system.UserName%",password="%system.Password%",authtype="basic",includeAcls="False"
-verb:sync -setParamFile:"%teamcity.build.checkoutDir%\Dist.%build.number%.zip.SetParameters.xml"
-AllowUntrusted -setParam:"IIS Web Application Name"="%system.WebSiteName%" -verbose
The error I am getting is:
[11:47:31][Step 3/3] Error Code: ERROR_EXCEPTION_WHILE_CREATING_OBJECT
[11:47:31][Step 3/3] More Information: Object of type 'package' and
path 'D:\TeamCity\buildAgent\work\e2b0015b49d87e90\Dist.30.zip' cannot
be created. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT.
[11:47:31][Step 3/3] Error: The Zip package
'D:\TeamCity\buildAgent\work\e2b0015b49d87e90\Dist.30.zip' could not
be loaded. [11:47:31][Step 3/3] Error: Could not find file
'D:\TeamCity\buildAgent\work\e2b0015b49d87e90\Dist.30.zip'.
[11:47:31][Step 3/3] Error count: 1. [11:47:31][Step 3/3] Process
exited with code -1 [11:47:31][Step 3/3] Step Deploy (Command Line)
failed
My build process is working as I end up with the correct artefacts, I just don't seem to be able to deploy my generated artefacts using MSDeploy
This is a screenshot of my artefacts:
I managed to get this working by changing my parameters to the following:
-source:iisapp='%teamcity.build.checkoutDir%\dist' -dest:iisapp='C:\www\xxxx-website',computerName="%system.MsDeployServiceUrl%",userName="%system.UserName%",password="%system.Password%",authtype="basic",includeAcls="False"
-verb:sync -AllowUntrusted -verbose
And changing my user to an admin user rather than an IIS user. Note use of iisapp - the key was to read the MSDeploy api using msdeploy -help
FYI - a good test is to use the intended command against msdeploy.exe in console and check output errors then push command into teamcity when it's working.
I created a grunt and gulp plugin to do just what you are looking to do. gulp-mswebdeploy-package and grunt-mswebdeploy-package will create a ms webdeploy package from any folder and do not require your build to be running on windows.
https://www.npmjs.com/package/gulp-mswebdeploy-package
https://www.npmjs.com/package/grunt-mswebdeploy-package

Load new module in Kamailio

I would like to ask, how can I load new module in Kamailio 4.1.2?
Actually, I have an issue, when I tried to compile my kamaiio.cfg
I've got error:
root#kamailio:/usr/local/# kamailio -c kamailio.cfg
loading modules under /usr/local/lib64/kamailio/modules/
0(25392) ERROR: <core> [sr_module.c:587]: load_module(): ERROR: load_module: could not find module <websocket> in </usr/local/lib64/kamailio/modules/>
0(25392) : <core> [cfg.y:3408]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 323, column 12-25: failed to load module
0(25392) ERROR: <core> [cfg.y:3272]: yyparse(): cfg. parser: failed to find command ws_handle_handshake
0(25392) : <core> [cfg.y:3411]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 1083, column 27: unknown command, missing loadmodule?
ERROR: bad config file (2 errors)
when I look physically to the /usr/local/lib64/kamailio/modules/ there is some modules, but websocket.so is missing.
So, how can I get and load module in Kamailio?
Thank you for help!
You haven't installed the module websocket. Edit modules.lst file in the source code directory and add websocket to include_modules variable. If you don't have modules.lst, just do:
make cfg
Alternative is to do:
make cfg include_modules="websocket"
By default, the build system for kamailio compiles and install only the modules that have the same dependencies as the core of the application. For websocket you need to install libunistring and openssl (libssl) devel packages.
Steps to load new module to Kamailio server. (Try if above answer is not working for you)
Check the modules is exist in the default module directly /usr/local/lib64/kamailio/modules.
If found, add loadmodule "module_name.so" in load module section in kamailio.cfg file.
If the module is not found in default module directory, you can check for the source code of that module in the default module source code directory /usr/local/src/kamailio-4.4/kamailio/modules.
If source code found, enter to the module directory. Then create modules' shared object file(.so) by following commands.
./configure
make
make test
make install
Then you will get a shared object file(.so). Copy that file into the default module directory. and load this module from the kamailio.cfg file as mentioned in step 1.
If module source code does not exist in the default source code directory, You need to download the source code from the web. And follow step 3 and 4.

fatal error LNK1104: cannot open file 'mysqlcppconn.lib'

Hi am using MS visual VC++ 2008
trying to connect mysql though vc++ code..getting this link error still after setting linker input parameter
but now showing the link erro:fatal error LNK1104: cannot open file 'mysqlcppconn.lib'
Set the mysqlcppconn.lib and libmysql.lib in the properties->configuration prperties-> Linker->Input->Additional dependencies.
IS there any way to set the mysqlcppconn.lib ?? any suggestion please
You may need to go to Properties->Configuration Properties->Linker->General->Additional Library Directories and add the directory that has the MySQL libraries in there so the linker can find them.
you can include lib file programmatically :
pragma comment(lib, "requiredLibrary.lib")
good luck!