Microsoft.InformationProtection.File.Ubuntu1804 - Load library failed for libmip_dotnet.so - microsoft-information-protection

I want to use the Microsoft.InformationProtection.File.Ubuntu1804 in a netcore3.1 console app. I published my app with the command:
dotnet publish MipConsole.csproj -o ../publish -f netcoreapp3.1 -c Release -r linux-x64
When I run it in docker image (mcr.microsoft.com/dotnet/core/aspnet:3.1-bionic) but i get the following error:
Unhandled exception. System.ComponentModel.Win32Exception (0x80004005): LoadLibrary failed for: [/publish/libmip_dotnet.so]
at Microsoft.InformationProtection.Utils.SafeNativeMethods.LoadLibrary(String dllToLoad)
at Microsoft.InformationProtection.Utils.Loader.LoadDlls(String dllFolder, String dllName, String[] dllDependencies)
at Microsoft.InformationProtection.MIP.Initialize(MipComponent mipComponent, String path)
at MipConsole.Program.Main(String[] args)
at MipConsole.Program.<Main>(String[] args)
In other post, the solution for windows application is to install VC++ redistributable... But what is the solution for Ubuntu ?

I'm working on getting this documented. You're likely missing the MIP SDK dependencies for Ubuntu. You can install those by:
sudo apt-get install libgsf-1-dev libssl-dev libsecret-1-dev freeglut3-dev libcpprest-dev libcurl3-dev uuid-dev

Related

CMake is throwing an error while Installing OpenCV

I am using this document as a guide
and i ran through this error
Install the project...
-- Install configuration: "RELEASE"
CMake Error at cmake_install.cmake:36 (file):
file cannot create directory: /installation/OpenCV-/share/licenses/opencv4.
Maybe need administrative privileges.
I just encountered the same problem as you. I found out that it is not a permission problem, but a path problem of OpenCV installation.
I use the following method for successfully installing OpenCV4.2.0 to my computer.
Change the path:
-D CMAKE_INSTALL_PREFIX = $cwd/installation/OpenCV-4.2.0
To
-D CMAKE_INSTALL_PREFIX = /usr/local

Unable to install nant on mac with mono verions 5.0+

I am unable to install NAnt on my MacBook pro having Mono version greater than 4.0, to be precise Mono version is 5.16.0
Tried installing from the source using the command: make install prefix=installation-path which threw the error
cp -R lib/ bootstrap/lib
# Mono loads log4net before privatebinpath is set-up, so we need this in the same directory
# as NAnt.exe
cp lib/common/neutral/log4net.dll bootstrap
cp src/NAnt.Console/App.config bootstrap/NAnt.exe.config
gmcs -target:exe -define:MONO,NET_1_0,NET_1_1,NET_2_0,ONLY_2_0 -out:bootstrap/NAnt.exe -r:bootstrap/log4net.dll \
-r:System.Configuration.dll -recurse:src/NAnt.Console/*.cs src/CommonAssemblyInfo.cs
/bin/sh: gmcs: command not found
make: *** [bootstrap/NAnt.exe] Error 127
*Relatively new to scripting.

Haskell cabal issue with Mac OS X 10.11? (cannot satisfy -package-id)

I used the latest Haskell Platform 7.10.2-a (https://www.haskell.org/platform/mac.html) on Mac OS X 10.11 for El-capitan.
When I tried to install yesod with cabal install yesod, I have multiple error messages such as:
Building email-validate-2.1.3...
Building http-api-data-0.2.1...
Building fast-logger-2.4.1...
Building http-date-0.0.6.1...
Failed to install crypto-random-0.0.9
Build log ( /Users/smcho/.cabal/logs/crypto-random-0.0.9.log ):
Configuring crypto-random-0.0.9...
Building crypto-random-0.0.9...
Preprocessing library crypto-random-0.0.9...
<command line>: cannot satisfy -package-id vector-0.11.0.0-730f99979d41c11c3a1ef069844b5f57
(use -v for more information)
Failed to install email-validate-2.1.3
Build log ( /Users/smcho/.cabal/logs/email-validate-2.1.3.log ):
Configuring email-validate-2.1.3...
The error pattern is pretty much the same: cannot satisfy -package-id.
For example, cabal install aeson gives cannot satisfy -package-id attoparse... error.
Resolving dependencies...
Configuring aeson-0.10.0.0...
Building aeson-0.10.0.0...
Failed to install aeson-0.10.0.0
Build log ( /Users/smcho/.cabal/logs/aeson-0.10.0.0.log ):
Configuring aeson-0.10.0.0...
Building aeson-0.10.0.0...
Preprocessing library aeson-0.10.0.0...
<command line>: cannot satisfy -package-id attoparsec-0.13.0.1-99b4df28644e63383f308c810764a8bb
(use -v for more information)
cabal: Error: some packages failed to install:
aeson-0.10.0.0 failed during the building phase. The exception was:
ExitFailure 1
However, attoparsec library seems to be installed without problem.
smcho#macho ~> cabal install attoparsec
Resolving dependencies...
All the requested packages are already installed:
attoparsec-0.13.0.1
Use --reinstall if you want to reinstall anyway.
What might be wrong?
As suggested here, the cannot satisfy -package-id error you're seeing might be due to an out of date cache.
If running ghc-pkg check warns you that your cache is out of date, then running ghc-pkg recache might resolve your issues.
I've been running into the cannot satisfy -package-id problem all morning (not with yesod, but with various other packages). ghc-pkg recache resolved my issues. Hope this helps.
This might be controversial, but imho the haskell platform and cabal (when used directly) are both essentially deprecated now with the advent of stack.
Stack will:
Automatically install haskell for you (stack setup)
Automatically sandbox (and intelligently share sandboxes between projects)
Completely avoid cabal hell (in my experience)
I could install yesod from brew.
Uninstall haskell-plaftorm
/Library/Haskell/bin/uninstall-hs thru 7.10.2
Install ghc
brew install ghc
brew link ghc
Install stackage
brew install haskell-stack
Install Yesod
stack install yesod
stack install yesod-bin
Use Yesod
Getting "Could not find module `Yesod'" when I try to run first example from Yesod book
stack runghc hello-world.hs
Use Yesod for development
I'm not sure, but I had to run stack exec yesod build first.
stack exec yesod devel.
Yesod deployment with keter
Remove the first line in config/keter.yaml
stack exec yesod keter, and you will get one binary in dist/bin that contains most of the necessary files to run.
Execute the binary as a standalone server.

pandoc can't install due to http-client

I'm trying to install pandoc 1.13.1 on Ubuntu 12.04.5, but its failing due to a dependency on http-client:
$ cabal install pandoc --verbose
Reading available packages...
Choosing modular solver.
Resolving dependencies...
Extracting
/home/paleozogt/.cabal/packages/hackage.haskell.org/pandoc/1.13.1/pandoc-1.13.1.tar.gz
to /tmp/pandoc-1.13.1-14926...
creating /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup
creating /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist
creating /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup
/usr/bin/ghc --make /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/Setup.hs -o /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup/setup -odir /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup -hidir /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup -i -i/tmp/pandoc-1.13.1-14926/pandoc-1.13.1 -package Cabal-1.14.0
[1 of 1] Compiling Main ( /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/Setup.hs, /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup/Main.o )
Linking /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup/setup ...
/tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup/setup configure --verbose=2
--ghc --prefix=/home/paleozogt/.cabal --user --flags=-trypandoc
--flags=network-uri --flags=-make-pandoc-man-pages --flags=https
--flags=-embed_data_files --constraint=zlib ==0.5.4.1 --constraint=zip-archive
==0.2.3.4 --constraint=yaml ==0.8.9.3 --constraint=xml ==1.3.13
--constraint=vector ==0.10.12.1 --constraint=unordered-containers ==0.2.5.1
--constraint=time ==1.4 --constraint=text ==1.1.1.3 --constraint=texmath ==0.8
--constraint=temporary ==1.2.0.3 --constraint=tagsoup ==0.13.3
--constraint=syb ==0.4.2 --constraint=scientific ==0.3.3.1 --constraint=random
==1.0.1.1 --constraint=process ==1.1.0.1 --constraint=parsec ==3.1.7
--constraint=pandoc-types ==1.12.4.1 --constraint=old-time ==1.1.0.0
--constraint=old-locale ==1.0.0.4 --constraint=network-uri ==2.6.0.1
--constraint=network ==2.6.0.2 --constraint=mtl ==2.2.1
--constraint=http-types ==0.8.5 --constraint=http-client-tls ==0.2.2
--constraint=http-client ==0.4.2 --constraint=hslua ==0.3.13
--constraint=highlighting-kate ==0.5.9 --constraint=haddock-library ==1.1.1
--constraint=filepath ==1.3.0.0 --constraint=extensible-exceptions ==0.1.1.4
--constraint=directory ==1.1.0.2 --constraint=deepseq-generics ==0.1.1.1
--constraint=data-default ==0.5.3 --constraint=containers ==0.4.2.1
--constraint=bytestring ==0.9.2.1 --constraint=blaze-markup ==0.6.1.1
--constraint=blaze-html ==0.7.0.3 --constraint=binary ==0.7.2.2
--constraint=base64-bytestring ==1.0.0.1 --constraint=base ==4.5.0.0
--constraint=array ==0.4.0.0 --constraint=aeson ==0.7.0.6 --constraint=SHA
==1.6.4.1 --constraint=JuicyPixels ==3.1.7.1 --constraint=HTTP ==4000.2.18
--disable-tests --disable-benchmarks
Configuring pandoc-1.13.1...
setup: At least the following dependencies are missing:
http-client >=0.3.2 && <0.4 && ==0.4.2
World file is already up to date.
cabal: Error: some packages failed to install:
pandoc-1.13.1 failed during the configure step. The exception was:
ExitFailure 1
What's weird is that http-client is installed:
$ cabal install http-client
Resolving dependencies...
All the requested packages are already installed:
http-client-0.4.2
Use --reinstall if you want to reinstall anyway.
What's going on here?
It seems cabal installed a too recent version of the http-client. I had the same problem and got over it by doing
cabal install --reinstall --force-reinstalls 'http-client < 0.4'
ghc-pkg unregister http-client-tls-0.2.2
ghc-pkg unregister http-client-0.4.2.2
cabal install pandoc
cabal install pandoc 'http-client < 0.4'

dpkg error: contains ununderstood data member

I'm trying to install a jailbreak tweak using make package install but I'm receiving this error from dpkg:
dpkg-deb: file `/tmp/_theos_install.deb' contains ununderstood data member data.tar.xz , giving up
dpkg: error processing /tmp/_theos_install.deb (--install):
subprocess dpkg-deb --fsys-tarfile returned error exit status 2
Errors were encountered while processing:
/tmp/_theos_install.deb
make: *** [internal-install] Error 1
So as far as I can tell it isn't able to understand the .xz extension, but I'm not sure why that file is being created. Thanks for the help.
I found out how to fix it. In $THEOS/makefiles/package/deb.mk replace this line:
$(ECHO_NOTHING)COPYFILE_DISABLE=1 $(FAKEROOT) -r dpkg-deb -b "$(THEOS_STAGING_DIR)" "$(_THEOS_DEB_PACKAGE_FILENAME)" $(STDERR_NULL_REDIRECT)$(ECHO_END)
with this line:
$(ECHO_NOTHING)COPYFILE_DISABLE=1 $(FAKEROOT) -r dpkg-deb -Zgzip -b "$(THEOS_STAGING_DIR)" "$(_THEOS_DEB_PACKAGE_FILENAME)" $(STDERR_NULL_REDIRECT)$(ECHO_END)
The .deb file is created because you told Theos build system to do that. The package install rule of the Makefile is creating the Debian package using xz compression. Now, this kind of compression is supported by versions of dpkg equal or higher than 1.15.6.
So, in order to solve your problem, you should update dpkg to a newer version or install Theos without packaging support. Probably a simple make install will do it.
In case that updating dpkg isn't possible and you don't want to install the program without package management support, the other (more painful) method is to change the algorithm in which the package is compressed. Here you have good information about how to do this.
In my case I was building a package on Ubuntu 18.04 and trying to install that package on Debian 7 (airgapped). I had to change the line in the Makefile that read:
dpkg --build $(DESTDIR)
..to:
dpkg-deb --build -Zgzip $(DESTDIR)
Thanks Connor!
Other option that you can try is to unpack the .deb that you where triying to install and repack with no XZ compression.
Unpack:
mkdir package/ && dpkg -x package.deb package/
Pack:
dpkg-deb --build -Zgzip package/
You can rename the resulting package with:
dpkg-name -o package.deb
Or simply name the package dir with the name of your package.
Important: In orther to perform this, you need to install dpkg-dev package:
sudo apt update
sudo apt install dpkg-dev

Resources