RStudio on Windows 2012 R2 cannot work without VC++ 2015 but it will not install - visual-c++

I have all updates on my installation of Windows 2012 R2 but for some reason none of the solutions suggested work. I require api-ms-win-crt-runtime-l1-1-0.dll to run RStudio, unfortunately, I have no way to get it running & I tried every solution proposed.
The exact problem is described in Cannot install Visual C++ Redistributable for Visual Studio 2015 (64-bit)
The expected result is VC++ 2015 to be installed & RStudio to run.
Attempts to manually apply those solutions didn't avail:
Log file result from installation of VC++ 2015:
[10E4:11E4][2023-01-07T02:05:12]i001: Burn v3.10.4.4718, Windows v6.3 (Build 9600: Service Pack 0), path: C:\Windows\Temp\{9F7F6448-26EA-488F-B797-D9C4ED9535A9}\.cr\VC_redist.x64.exe
[10E4:11E4][2023-01-07T02:05:12]i009: Command Line: '-burn.clean.room=C:\Users\Administrator\Desktop\VC_redist.x64.exe -burn.filehandle.attached=308 -burn.filehandle.self=316'
[10E4:11E4][2023-01-07T02:05:12]i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\Users\Administrator\Desktop\VC_redist.x64.exe'
[10E4:11E4][2023-01-07T02:05:12]i000: Setting string variable 'WixBundleOriginalSourceFolder' to value 'C:\Users\Administrator\Desktop\'
[10E4:11E4][2023-01-07T02:05:12]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\ADMINI~1\AppData\Local\Temp\dd_vcredist_amd64_20230107020512.log'
[10E4:11E4][2023-01-07T02:05:12]i000: Setting string variable 'WixBundleName' to value 'Microsoft Visual C++ 2015-2022 Redistributable (x64) - 14.34.31931'
[10E4:11E4][2023-01-07T02:05:12]i000: Setting string variable 'WixBundleManufacturer' to value 'Microsoft Corporation'
[10E4:12B4][2023-01-07T02:05:12]i000: Setting version variable 'WixBundleFileVersion' to value '14.34.31931.0'
[10E4:11E4][2023-01-07T02:05:12]i100: Detect begin, 11 packages
[10E4:11E4][2023-01-07T02:05:12]i000: Setting string variable 'Arm64_Check' to value 'AMD64'
[10E4:11E4][2023-01-07T02:05:12]i000: File search: windows_uCRT_DetectKey, did not find path: C:\Windows\system32\ucrtbase.dll
[10E4:11E4][2023-01-07T02:05:12]i000: File search: windows_uCRT_DetectKeyExists, did not find path: C:\Windows\system32\ucrtbase.dll
[10E4:11E4][2023-01-07T02:05:12]i000: Setting numeric variable 'windows_uCRT_DetectKeyExists' to value 0
[10E4:11E4][2023-01-07T02:05:12]i102: Detected related bundle: {e46eca4f-393b-40df-9f49-076faf788d83}, type: Upgrade, scope: PerMachine, version: 14.0.23026.0, operation: MajorUpgrade
[10E4:11E4][2023-01-07T02:05:12]i052: Condition '(VersionNT = v6.3 AND NOT VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[10E4:11E4][2023-01-07T02:05:12]i052: Condition '(VersionNT = v6.3 AND VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[10E4:11E4][2023-01-07T02:05:12]i052: Condition '(VersionNT = v6.2 AND NOT VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[10E4:11E4][2023-01-07T02:05:12]i052: Condition '(VersionNT = v6.2 AND VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[10E4:11E4][2023-01-07T02:05:12]i052: Condition '(VersionNT = v6.1 AND NOT VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[10E4:11E4][2023-01-07T02:05:12]i052: Condition '(VersionNT = v6.1 AND VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[10E4:11E4][2023-01-07T02:05:12]i052: Condition '(VersionNT = v6.0 AND NOT VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[10E4:11E4][2023-01-07T02:05:12]i052: Condition '(VersionNT = v6.0 AND VersionNT64) AND (windows_uCRT_DetectKeyExists AND windows_uCRT_DetectKey >= v10.0.10240.0)' evaluates to false.
[10E4:11E4][2023-01-07T02:05:12]i103: Detected related package: {0D3E9E15-DE7A-300B-96F1-B4AF12B96488}, scope: PerMachine, version: 14.0.23026.0, language: 0 operation: MajorUpgrade
[10E4:11E4][2023-01-07T02:05:12]i103: Detected related package: {BC958BD2-5DAC-3862-BB1A-C1BE0790438D}, scope: PerMachine, version: 14.0.23026.0, language: 0 operation: MajorUpgrade
[10E4:11E4][2023-01-07T02:05:12]i103: Detected related package: {0D3E9E15-DE7A-300B-96F1-B4AF12B96488}, scope: PerMachine, version: 14.0.23026.0, language: 0 operation: MajorUpgrade
[10E4:11E4][2023-01-07T02:05:12]i103: Detected related package: {BC958BD2-5DAC-3862-BB1A-C1BE0790438D}, scope: PerMachine, version: 14.0.23026.0, language: 0 operation: MajorUpgrade
[10E4:11E4][2023-01-07T02:05:12]i101: Detected package: Windows81_x86, state: Absent, cached: None
[10E4:11E4][2023-01-07T02:05:12]i101: Detected package: Windows81_x64, state: Absent, cached: None
[10E4:11E4][2023-01-07T02:05:12]i101: Detected package: Windows8_x86, state: Absent, cached: None
[10E4:11E4][2023-01-07T02:05:12]i101: Detected package: Windows8_x64, state: Absent, cached: None
[10E4:11E4][2023-01-07T02:05:12]i101: Detected package: Windows7_MSU_x86, state: Absent, cached: None
[10E4:11E4][2023-01-07T02:05:12]i101: Detected package: Windows7_MSU_x64, state: Absent, cached: None
[10E4:11E4][2023-01-07T02:05:12]i101: Detected package: WindowsVista_MSU_x86, state: Absent, cached: None
[10E4:11E4][2023-01-07T02:05:12]i101: Detected package: WindowsVista_MSU_x64, state: Absent, cached: None
[10E4:11E4][2023-01-07T02:05:12]i101: Detected package: vcRuntimeMinimum_x64, state: Absent, cached: None
[10E4:11E4][2023-01-07T02:05:12]i101: Detected package: vcRuntimeAdditional_x64, state: Absent, cached: None
[10E4:11E4][2023-01-07T02:05:12]i101: Detected package: vcRuntime_arm64, state: Absent, cached: None
[10E4:11E4][2023-01-07T02:05:12]i052: Condition 'VersionNT >= v6.1' evaluates to true.
[10E4:11E4][2023-01-07T02:05:12]i199: Detect complete, result: 0x0
[10E4:12B4][2023-01-07T02:05:17]i000: Setting numeric variable 'EulaAcceptCheckbox' to value 1
[10E4:11E4][2023-01-07T02:05:17]i200: Plan begin, 11 packages, action: Install
[10E4:11E4][2023-01-07T02:05:17]i052: Condition 'VersionNT = v6.3 AND NOT VersionNT64' evaluates to false.
[10E4:11E4][2023-01-07T02:05:17]w321: Skipping dependency registration on package with no dependency providers: Windows81_x86
[10E4:11E4][2023-01-07T02:05:17]i052: Condition 'VersionNT = v6.3 AND VersionNT64' evaluates to true.
[10E4:11E4][2023-01-07T02:05:17]w321: Skipping dependency registration on package with no dependency providers: Windows81_x64
[10E4:11E4][2023-01-07T02:05:17]i052: Condition 'VersionNT = v6.2 AND NOT VersionNT64' evaluates to false.
[10E4:11E4][2023-01-07T02:05:17]w321: Skipping dependency registration on package with no dependency providers: Windows8_x86
[10E4:11E4][2023-01-07T02:05:17]i052: Condition 'VersionNT = v6.2 AND VersionNT64' evaluates to false.
[10E4:11E4][2023-01-07T02:05:17]w321: Skipping dependency registration on package with no dependency providers: Windows8_x64
[10E4:11E4][2023-01-07T02:05:17]i052: Condition 'VersionNT = v6.1 AND NOT VersionNT64' evaluates to false.
[10E4:11E4][2023-01-07T02:05:17]w321: Skipping dependency registration on package with no dependency providers: Windows7_MSU_x86
[10E4:11E4][2023-01-07T02:05:17]i052: Condition 'VersionNT = v6.1 AND VersionNT64' evaluates to false.
[10E4:11E4][2023-01-07T02:05:17]w321: Skipping dependency registration on package with no dependency providers: Windows7_MSU_x64
[10E4:11E4][2023-01-07T02:05:17]i052: Condition 'VersionNT = v6.0 AND NOT VersionNT64' evaluates to false.
[10E4:11E4][2023-01-07T02:05:17]w321: Skipping dependency registration on package with no dependency providers: WindowsVista_MSU_x86
[10E4:11E4][2023-01-07T02:05:17]i052: Condition 'VersionNT = v6.0 AND VersionNT64' evaluates to false.
[10E4:11E4][2023-01-07T02:05:17]w321: Skipping dependency registration on package with no dependency providers: WindowsVista_MSU_x64
[10E4:11E4][2023-01-07T02:05:17]i052: Condition '(VersionNT64) AND NOT (Arm64_Check = "ARM64")' evaluates to true.
[10E4:11E4][2023-01-07T02:05:17]i000: Setting string variable 'WixBundleRollbackLog_vcRuntimeMinimum_x64' to value 'C:\Users\ADMINI~1\AppData\Local\Temp\dd_vcredist_amd64_20230107020512_001_vcRuntimeMinimum_x64_rollback.log'
[10E4:11E4][2023-01-07T02:05:17]i000: Setting string variable 'WixBundleLog_vcRuntimeMinimum_x64' to value 'C:\Users\ADMINI~1\AppData\Local\Temp\dd_vcredist_amd64_20230107020512_001_vcRuntimeMinimum_x64.log'
[10E4:11E4][2023-01-07T02:05:17]i052: Condition '(VersionNT64) AND NOT (Arm64_Check = "ARM64")' evaluates to true.
[10E4:11E4][2023-01-07T02:05:17]i000: Setting string variable 'WixBundleRollbackLog_vcRuntimeAdditional_x64' to value 'C:\Users\ADMINI~1\AppData\Local\Temp\dd_vcredist_amd64_20230107020512_002_vcRuntimeAdditional_x64_rollback.log'
[10E4:11E4][2023-01-07T02:05:17]i000: Setting string variable 'WixBundleLog_vcRuntimeAdditional_x64' to value 'C:\Users\ADMINI~1\AppData\Local\Temp\dd_vcredist_amd64_20230107020512_002_vcRuntimeAdditional_x64.log'
[10E4:11E4][2023-01-07T02:05:17]i052: Condition 'Arm64_Check = "ARM64"' evaluates to false.
[10E4:11E4][2023-01-07T02:05:17]i201: Planned package: Windows81_x86, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[10E4:11E4][2023-01-07T02:05:17]i201: Planned package: Windows81_x64, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: None
[10E4:11E4][2023-01-07T02:05:17]i201: Planned package: Windows8_x86, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[10E4:11E4][2023-01-07T02:05:17]i201: Planned package: Windows8_x64, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[10E4:11E4][2023-01-07T02:05:17]i201: Planned package: Windows7_MSU_x86, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[10E4:11E4][2023-01-07T02:05:17]i201: Planned package: Windows7_MSU_x64, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[10E4:11E4][2023-01-07T02:05:17]i201: Planned package: WindowsVista_MSU_x86, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[10E4:11E4][2023-01-07T02:05:17]i201: Planned package: WindowsVista_MSU_x64, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[10E4:11E4][2023-01-07T02:05:17]i201: Planned package: vcRuntimeMinimum_x64, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: Register
[10E4:11E4][2023-01-07T02:05:17]i201: Planned package: vcRuntimeAdditional_x64, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: Register
[10E4:11E4][2023-01-07T02:05:17]i201: Planned package: vcRuntime_arm64, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[10E4:11E4][2023-01-07T02:05:17]i207: Planned related bundle: {e46eca4f-393b-40df-9f49-076faf788d83}, type: Upgrade, default requested: Absent, ba requested: Absent, execute: Uninstall, rollback: Install, dependency: None
[10E4:11E4][2023-01-07T02:05:17]i299: Plan complete, result: 0x0
[10E4:11E4][2023-01-07T02:05:17]i300: Apply begin
[10E4:11E4][2023-01-07T02:05:17]i010: Launching elevated engine process.
[10E4:11E4][2023-01-07T02:05:17]i011: Launched elevated engine process.
[10E4:11E4][2023-01-07T02:05:17]i012: Connected to elevated engine.
[0C20:0EE0][2023-01-07T02:05:17]i358: Pausing automatic updates.
[0C20:0EE0][2023-01-07T02:05:18]i359: Paused automatic updates.
[0C20:0EE0][2023-01-07T02:05:18]i360: Creating a system restore point.
[0C20:0EE0][2023-01-07T02:05:18]i362: System restore disabled, system restore point not created.
[0C20:0EE0][2023-01-07T02:05:18]i370: Session begin, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{d4cecf3b-b68f-4995-8840-52ea0fab646e}, options: 0x7, disable resume: No
[0C20:0EE0][2023-01-07T02:05:18]i000: Caching bundle from: 'C:\Windows\Temp\{24898943-C62B-411E-A84F-E9DEA6A59B2E}\.be\VC_redist.x64.exe' to: 'C:\ProgramData\Package Cache\{d4cecf3b-b68f-4995-8840-52ea0fab646e}\VC_redist.x64.exe'
[0C20:0EE0][2023-01-07T02:05:18]i320: Registering bundle dependency provider: VC,redist.x64,amd64,14.34,bundle, version: 14.34.31931.0
[0C20:0EE0][2023-01-07T02:05:18]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{d4cecf3b-b68f-4995-8840-52ea0fab646e}, resume: Active, restart initiated: No, disable resume: No
[0C20:0A88][2023-01-07T02:05:18]i305: Verified acquired payload: Windows81_x64 at path: C:\ProgramData\Package Cache\.unverified\Windows81_x64, moving to: C:\ProgramData\Package Cache\3ACBF3890FC9C8A6F3D2155ECF106028E5F55164\packages\Patch\x64\Windows8.1-KB2999226-x64.msu.
[0C20:0A88][2023-01-07T02:05:18]i305: Verified acquired payload: vcRuntimeMinimum_x64 at path: C:\ProgramData\Package Cache\.unverified\vcRuntimeMinimum_x64, moving to: C:\ProgramData\Package Cache\{CF4C347D-954E-4543-88D2-EC17F07F466F}v14.34.31931\packages\vcRuntimeMinimum_amd64\vc_runtimeMinimum_x64.msi.
[0C20:0A88][2023-01-07T02:05:18]i305: Verified acquired payload: cab5046A8AB272BF37297BB7928664C9503 at path: C:\ProgramData\Package Cache\.unverified\cab5046A8AB272BF37297BB7928664C9503, moving to: C:\ProgramData\Package Cache\{CF4C347D-954E-4543-88D2-EC17F07F466F}v14.34.31931\packages\vcRuntimeMinimum_amd64\cab1.cab.
[0C20:0A88][2023-01-07T02:05:18]i305: Verified acquired payload: vcRuntimeAdditional_x64 at path: C:\ProgramData\Package Cache\.unverified\vcRuntimeAdditional_x64, moving to: C:\ProgramData\Package Cache\{EAE242B1-0A26-485A-BFEB-0292EE9F03CB}v14.34.31931\packages\vcRuntimeAdditional_amd64\vc_runtimeAdditional_x64.msi.
[0C20:0A88][2023-01-07T02:05:18]i305: Verified acquired payload: cab2C04DDC374BD96EB5C8EB8208F2C7C92 at path: C:\ProgramData\Package Cache\.unverified\cab2C04DDC374BD96EB5C8EB8208F2C7C92, moving to: C:\ProgramData\Package Cache\{EAE242B1-0A26-485A-BFEB-0292EE9F03CB}v14.34.31931\packages\vcRuntimeAdditional_amd64\cab1.cab.
[0C20:0EE0][2023-01-07T02:05:18]i301: Applying execute package: Windows81_x64, action: Install, path: C:\ProgramData\Package Cache\3ACBF3890FC9C8A6F3D2155ECF106028E5F55164\packages\Patch\x64\Windows8.1-KB2999226-x64.msu, arguments: '"C:\Windows\SysNative\wusa.exe" "C:\ProgramData\Package Cache\3ACBF3890FC9C8A6F3D2155ECF106028E5F55164\packages\Patch\x64\Windows8.1-KB2999226-x64.msu" /quiet /norestart'
[0C20:0EE0][2023-01-07T02:07:40]e000: Error 0x80240017: Failed to execute MSU package.
[10E4:11E4][2023-01-07T02:07:40]e000: Error 0x80240017: Failed to configure per-machine MSU package.
[10E4:11E4][2023-01-07T02:07:40]i319: Applied execute package: Windows81_x64, result: 0x80240017, restart: None
[10E4:11E4][2023-01-07T02:07:40]e000: Error 0x80240017: Failed to execute MSU package.
[0C20:0EE0][2023-01-07T02:07:40]i372: Session end, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{d4cecf3b-b68f-4995-8840-52ea0fab646e}, resume: None, restart: None, disable resume: No
[0C20:0EE0][2023-01-07T02:07:40]i330: Removed bundle dependency provider: VC,redist.x64,amd64,14.34,bundle
[0C20:0EE0][2023-01-07T02:07:40]i352: Removing cached bundle: {d4cecf3b-b68f-4995-8840-52ea0fab646e}, from path: C:\ProgramData\Package Cache\{d4cecf3b-b68f-4995-8840-52ea0fab646e}\
[0C20:0EE0][2023-01-07T02:07:40]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{d4cecf3b-b68f-4995-8840-52ea0fab646e}, resume: None, restart initiated: No, disable resume: No
[10E4:11E4][2023-01-07T02:07:41]i399: Apply complete, result: 0x80240017, restart: None, ba requested restart: No

Related

How can I connect to my GitLab omnibus LDAP server to running in a container?

I have been trying to work on this for weeks.
root#git:/# gitLab-rake gitlab:ldap:check
Checking LDAP ...
LDAP: ... Server: ldapmain
Deprecation warning: Net::LDAP::ConnectionRefused will be deprecated. Use Errno::ECONNREFUSED instead.
Deprecation warning: Net::LDAP::ConnectionRefused will be deprecated. Use Errno::ECONNREFUSED instead.
Could not connect to the LDAP server: Connection refused - connect(2) for 172.17.0.2:389
Checking LDAP ... Finished
These are the /etc/gitlab/gitlab.rb files:
gitlab_rails['ldap_enabled'] = true
# gitlab_rails['prevent_ldap_sign_in'] = false
###! **remember to close this block with 'EOS' below**
gitlab_rails['ldap_servers'] = YAML.load <<-'EOS'
main: # 'main' is the GitLab 'provider ID' of this LDAP server
label: 'GitLab LDAP'
host: 'git.example.com'
port: 389
uid: 'sAMAccountName'
bind_dn: 'cn=admin,dc=example,dc=com'
password: 'example'
encryption: 'plain' # "start_tls" or "simple_tls" or "plain"
verify_certificates: false
active_directory: true
allow_username_or_email_login: true
lowercase_usernames: false
block_auto_created_users: false
base: 'OU=users,dc=example,dc=com'
user_filter: ''
# ## EE only
group_base: 'cn=my_group,ou=groups,dc=example,dc=com'
admin_group: 'my_admin_group'
EOS
Is there any work around this error? Thanks in advance

When I use electron-builder to package an NSIS program, I get: Fatal error: Unable to parse version string for FileVersion

Electron-Builder Version: 22.14.5
Node Version: v16.13.1
Electron Version: 16.0.6
Electron Type (current, beta, nightly): current
Not using electron-updater
Target: nsis
Here is the console log.
Compilation succeeded.
• electron-builder version=22.14.5 os=5.10.89-1-MANJARO
• loaded configuration file=/home/aszswaz/document/notebook/code-example/webpack-electron-vue/config/electron-builder-win.js
• Specified application directory equals to project dir — superfluous or wrong configuration appDirectory=./
• writing effective config file=dist/electron-builder/builder-effective-config.yaml
• skipped dependencies rebuild reason=npmRebuild is set to false
• packaging platform=win32 arch=x64 electron=v16.0.6 appOutDir=dist/electron-builder/win-unpacked
• asar usage is disabled — this is strongly not recommended solution=enable asar and use asarUnpack to unpack files that must be externally available
• asar usage is disabled — this is strongly not recommended solution=enable asar and use asarUnpack to unpack files that must be externally available
⨯ cannot execute cause=exit status 1
errorOut=Fatal error: Unable to parse version string for FileVersion
0024:fixme:ver:GetCurrentPackageId (0032FE94 00000000): stub
command=wine /home/aszswaz/.cache/electron-builder/winCodeSign/winCodeSign-2.6.0/rcedit-ia32.exe /home/aszswaz/document/notebook/code-example/webpack-electron-vue/dist/electron-builder/win-unpacked/hanna.exe --set-version-string FileDescription hanna --set-version-string ProductName hanna --set-version-string LegalCopyright aszswaz --set-file-version v1.0.0 --set-product-version 1.0.0.0 --set-version-string InternalName hanna --set-version-string OriginalFilename '' --set-version-string CompanyName aszswaz --set-icon /home/aszswaz/document/notebook/code-example/webpack-electron-vue/public/icon.ico
workingDir=
This is the config file used.
module.exports = {
appId: "cn.aszswaz.demo.webpack-electron-vue",
productName: "hanna",
copyright: "aszswaz",
asar: false,
files: [
"dist/app/*",
"!**/node_modules/vue/*",
"!**/node_modules/vue-router/*"
],
artifactName: "${productName}-${arch}-${version}.${ext}",
directories: {
app: "./",
output: "./dist/electron-builder"
},
win: {
target: "nsis",
icon: "public/icon.ico"
},
nsis: {
oneClick: false,
perMachine: true,
allowToChangeInstallationDirectory: true
},
npmRebuild: false,
buildVersion: "v1.0.0",
electronCompile: false,
electronDownload: {
version: "16.0.6",
platform: "win32",
arch: "x64",
cache: process.cwd() + "/cache"
},
electronVersion: "v16.0.6"
}
What is the reason for this error? How can I fix this error?

How to create secured files in Puppet5 with Hiera?

I want to create SSL certificate and try to secure this operation.
I am using Puppet 5.5.2 and gem hiera-eyaml.
Created simple manifest
cat /etc/puppetlabs/code/environments/production/manifests/site.pp
package { 'tree':
ensure => installed,
}
package { 'httpd':
ensure => installed,
}
$filecrt = lookup('files')
create_resources( 'file', $filecrt )
Hiera config
---
version: 5
defaults:
# The default value for "datadir" is "data" under the same directory as the hiera.yaml
# file (this file)
# When specifying a datadir, make sure the directory exists.
# See https://puppet.com/docs/puppet/latest/environments_about.html for further details on environments.
datadir: data
data_hash: yaml_data
hierarchy:
- name: "Secret data: per-node, per-datacenter, common"
lookup_key: eyaml_lookup_key # eyaml backend
paths:
- "nodes/%{facts.fqdn}.eyaml"
- "nodes/%{trusted.certname}.eyaml" # Include explicit file extension
- "location/%{facts.whereami}.eyaml"
- "common.eyaml"
options:
pkcs7_private_key: /etc/puppetlabs/puppet/eyaml/keys/private_key.pkcs7.pem
pkcs7_public_key: /etc/puppetlabs/puppet/eyaml/keys/public_key.pkcs7.pem
- name: "YAML hierarchy levels"
paths:
- "common.yaml"
- "nodes/%{facts.fqdn}.yaml"
- "nodes/%{::trusted.certname}.yaml"
And common.yaml
---
files:
'/etc/httpd/conf/server.crt':
ensure: present
mode: '0600'
owner: 'root'
group: 'root'
content: 'ENC[PKCS7,{LOT_OF_STRING_SKIPPED}+uaCmcHgDAzsPD51soM+AIkIlv0ANpUXzBpwM3tqQ3ysFtz81S0xuVbKvslK]'
But have en error while applying manifest
Error: Evaluation Error: Error while evaluating a Function Call, create_resources(): second argument must be a hash (file: /etc/puppetlabs/code/environments/production/manifests/site.pp, line: 12, column: 1) on node test1.com
I really dont know what to do )
The problem appears to be that the indentation in common.yaml isn't right - currently, file will be null rather than a hash, which explains the error message. Also, the file should be called common.eyaml, otherwise the ENC string won't be decrypted. Try
---
files:
'/etc/httpd/conf/server.crt':
ensure: present
mode: '0600'
owner: 'root'
group: 'root'
content: 'ENC[PKCS7{LOTS_OF_STRING_SKIPPED}UXzBpwM3tqQ3ysFtz81S0xuVbKvslK]'
There is an online YAML parser at http://yaml-online-parser.appspot.com/ if you want to see the difference the indentation makes.
Found another solution.
Its was a problem with lookup and hashes. When I have multiply lines in hiera hash, I must specify them https://docs.puppet.com/puppet/4.5/function.html#lookup
So i decided use only 'content' variable to lookup
cat site.pp
$filecrt = lookup('files')
file { 'server.crt':
ensure => present,
path => '/etc/httpd/conf/server.crt',
content => $filecrt,
owner => 'root',
group => 'root',
mode => '0600',
}
and Hiera
---
files:'ENC[PKCS7{LOT_OF_STRING_SKIPPED}+uaCmcHgDAzsPD51soM+AIkIlv0ANpUXzBpwM3tqQ3ysFtz81S0xuVbKvslK]'

Mocha tests passing on localhost but not when running on TravisCI

I've written a test suite like so:
this.slow(1000)
this.timeout(6000)
var response, client
before(function(done) {
client = new UsergridClient()
client.GET(_collection, function(err, r) {
response = r
done()
})
})
it('should not fail when a callback function is not passed', function() {
// note: this test will NOT fail gracefully inside the Mocha event chain
client.GET(_collection)
})
it('should return a 200 ok', function() {
// ******** LOGGING ********* //
console.log(response)
// ******** LOGGING ********* //
response.statusCode.should.equal(200)
})
it('response.entities should be an array', function() {
response.entities.should.be.an.Array
})
it('response.first should exist and have a valid uuid', function() {
response.first.should.be.an.Object.with.property('uuid').with.a.lengthOf(36)
})
it('response.entity should exist and have a valid uuid', function() {
response.entity.should.be.an.Object.with.property('uuid').with.a.lengthOf(36)
})
it('response.last should exist and have a valid uuid', function() {
response.last.should.be.an.Object.with.property('uuid').with.a.lengthOf(36)
})
When running this test locally, all tests pass. When running on TravisCI though, the response variables are being reported as undefined even inside the tests. This suggests to me that there's some sort of asynchronous mixup, but using the done() callback on the before() should mitigate that, shouldn't it? I even tried adding done callbacks to every subsequent test, but that still isn't working.
The notable error here is:
TypeError: Cannot read property 'property' of undefined
and it looks like that's being thrown from:
response.first.should.be.an.Object.with.property('uuid').with.a.lengthOf(36)
which makes me think Travis' environment doesn't like Object.with or maybe even just .with?
Here's my .travis.yml file:
language: node_js
node_js:
- '5.1.0'
install:
- 'npm install'
- 'npm -g install mocha'
script:
- 'mocha tests'
And here's the run log:
Using worker: worker-linux-docker-7421b08d.prod.travis-ci.org:travis-linux-8
system_info
Build system information
Build language: node_js
Build group: stable
Build dist: precise
Build image provisioning date and time
Thu Feb 5 15:09:33 UTC 2015
Operating System Details
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Codename: precise
Linux Version
3.13.0-29-generic
Cookbooks Version
a68419e https://github.com/travis-ci/travis-cookbooks/tree/a68419e
GCC version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
clang version 3.4 (tags/RELEASE_34/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Pre-installed Ruby versions
ruby-1.9.3-p551
Pre-installed Node.js versions
v0.10.36
Pre-installed Go versions
1.4.1
Redis version
redis-server 2.8.19
riak version
2.0.2
MongoDB version
MongoDB 2.4.12
CouchDB version
couchdb 1.6.1
Neo4j version
1.9.4
RabbitMQ Version
3.4.3
ElasticSearch version
1.4.0
Installed Sphinx versions
2.0.10
2.1.9
2.2.6
Default Sphinx version
2.2.6
Installed Firefox version
firefox 31.0esr
PhantomJS version
1.9.8
ant -version
Apache Ant(TM) version 1.8.2 compiled on December 3 2011
mvn -version
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T17:29:23+00:00)
Maven home: /usr/local/maven
Java version: 1.7.0_76, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-oracle/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "3.13.0-29-generic", arch: "amd64", family: "unix"
git.checkout
0.36s$ git clone... cloning
remote: Counting objects: 315, done.
remote: Compressing objects: 100% (153/153), done.
remote: Total 315 (delta 74), reused 0 (delta 0), pack-reused 161
Receiving objects: 100% (315/315), 48.32 KiB | 0 bytes/s, done.
Resolving deltas: 100% (156/156), done.
Checking connectivity... done.
$ cd path/to/proj
$ git checkout -qf <hash>
This job is running on container-based infrastructure, which does not allow use of 'sudo', setuid and setguid executables.
If you require sudo, add 'sudo: required' to your .travis.yml
See http://docs.travis-ci.com/user/workers/container-based-infrastructure/ for details.
3.13s$ nvm install 5.1.0
######################################################################## 100.0%
Checksums empty
Now using node v5.1.0
$ node --version
v5.1.0
$ npm --version
3.3.12
$ nvm --version
0.23.3
install.1
17.95s$ npm install
npm WARN engine underscore.inflection#1.3.0: wanted: {"node":">=0.10.0 <0.12"} (current: {"node":"5.1.0","npm":"3.3.12"})
npm WARN deprecated lodash#0.9.2: lodash#<3.0.0 is no longer maintained. Upgrade to lodash#^3.0.0.
npm WARN deprecated lodash#2.4.2: lodash#<3.0.0 is no longer maintained. Upgrade to lodash#^3.0.0.
app#2.0.0 /home/travis/build/path/to/app
... list of packages
npm WARN EPACKAGEJSON app#2.0.0 No repository field.
install.2
1.71s$ npm -g install mocha
/home/travis/.nvm/versions/node/v5.1.0/bin/mocha -> /home/travis/.nvm/versions/node/v5.1.0/lib/node_modules/mocha/bin/mocha
/home/travis/.nvm/versions/node/v5.1.0/bin/_mocha -> /home/travis/.nvm/versions/node/v5.1.0/lib/node_modules/mocha/bin/_mocha
/home/travis/.nvm/versions/node/v5.1.0/lib
... list of packages
1.50s$ mocha tests
init() / initSharedInstance()
✓ should be an instance of Client
Client
initialization
✓ should fail to initialize without an orgId and appId
✓ should initialize using properties defined in config.json
✓ should initialize when passing orgId and appId as arguments, taking precedence over config
✓ should initialize when passing an object containing orgId and appId, taking precedence over config
GET()
IncomingMessage {
_readableState:
... omitted
readable: false,
domain: null,
headers:
... omitted
client:
... omitted
req:
... omitted
request:
... omitted
toJSON: [Function: responseToJSON],
caseless:
Caseless {
dict:
{ 'access-control-allow-origin': '*',
'content-type': 'application/json',
date: 'Sun, 29 Nov 2015 22:44:54 GMT',
server: 'Apache-Coyote/1.1',
'set-cookie': [Object],
'transfer-encoding': 'chunked',
connection: 'Close' } },
read: [Function],
body:
{ action: 'get',
application: '19748000-24b6-11e3-9877-6d1a3f81ba2f',
params: {},
path: '/tests',
uri: 'https://api.mydomain.com/myorg/sandbox/tests',
entities:
[ [Object],
[Object],
[Object],
[Object],
[Object],
[Object],
[Object] ],
timestamp: 1448837094623,
duration: 65,
organization: 'myorg',
applicationName: 'sandbox',
cursor: 'LTU2ODc0MzQzOkdCcGJDbVpTRWVXVndibnE5RUdORGc',
count: 7 },
entities:
[ ],
first:
{ uuid: 'b3037a1a-4cd6-11e5-8aa2-0b8eb3ce43ee',
type: 'test',
name: '01',
created: 1440692071473,
modified: 1440692071473,
food: 'pizza',
metadata: { path: '/tests/b3037a1a-4cd6-11e5-8aa2-0b8eb3ce43ee' },
value: 1 },
entity:
{ uuid: 'b3037a1a-4cd6-11e5-8aa2-0b8eb3ce43ee',
type: 'test',
name: '01',
created: 1440692071473,
modified: 1440692071473,
food: 'pizza',
metadata: { path: '/tests/b3037a1a-4cd6-11e5-8aa2-0b8eb3ce43ee' },
value: 1 },
last:
{ uuid: '181a5b0a-6652-11e5-95c1-b9eaf4418d0e',
type: 'test',
created: 1443493848240,
modified: 1443493848240,
metadata: { path: '/tests/181a5b0a-6652-11e5-95c1-b9eaf4418d0e' },
title: 'Charlotte\'s Web' } }
✓ should not fail when a callback function is not passed
✓ should return a 200 ok
✓ response.entities should be an array
1) response.first should exist and have a valid uuid
2) response.entity should exist and have a valid uuid
3) response.last should exist and have a valid uuid
POST()
✓ should not fail when a callback function is not passed
✓ should return a 200 ok
4) response.entities should be an array
5) response.entity should exist and have a valid uuid
✓ response.entity.author should equal "Sir Arthur Conan Doyle"
PUT()
✓ should not fail when a callback function is not passed
✓ should return a 200 ok
6) response.entities should be an array
7) response.entity should exist and its uuid should the uuid from the previous POST requets
✓ response.entity.narrator should equal "Peter Doyle"
DELETE()
✓ should not fail when a callback function is not passed
✓ should return a 200 ok
✓ response.error.name should equal "service_resource_not_found"
authenticateApp()
✓ should return a 200 ok
✓ should have a valid token
✓ client.appAuth.token should be set to the token returned from
✓ client.appAuth.expiry should be set to a future date
appAuth / setAppAuth()
✓ should initialize by passing a list of arguments
✓ should initialize by passing an object
✓ should initialize by passing an instance of AppAuth
✓ should initialize by setting to an instance of AppAuth
Query
_type
✓ query._type should equal "cats" when passing "type" as a parameter to Query
✓ query._type should equal "cats" when calling .type() builder method
✓ query._type should equal "cats" when calling .collection() builder method
_limit
✓ query._limit should equal 10
_ql
✓ should support complex builder syntax (chained constructor methods)
✓ not operator should precede conditional statement
✓ string values should be contained in single quotes
✓ boolean values should not be contained in single quotes
✓ float values should not be contained in single quotes
✓ integer values should not be contained in single quotes
✓ uuid values should not be contained in single quotes
36 passing (696ms)
7 failing
1) Client GET() response.first should exist and have a valid uuid:
TypeError: Cannot read property 'property' of undefined
at Context.<anonymous> (tests/lib/client.test.js:69:48)
2) Client GET() response.entity should exist and have a valid uuid:
TypeError: Cannot read property 'property' of undefined
at Context.<anonymous> (tests/lib/client.test.js:73:49)
3) Client GET() response.last should exist and have a valid uuid:
TypeError: Cannot read property 'property' of undefined
at Context.<anonymous> (tests/lib/client.test.js:77:47)
4) Client POST() response.entities should be an array:
TypeError: Cannot read property 'a' of undefined
at Context.<anonymous> (tests/lib/client.test.js:108:50)
5) Client POST() response.entity should exist and have a valid uuid:
TypeError: Cannot read property 'property' of undefined
at Context.<anonymous> (tests/lib/client.test.js:112:49)
6) Client PUT() response.entities should be an array:
TypeError: Cannot read property 'a' of undefined
at Context.<anonymous> (tests/lib/client.test.js:146:50)
7) Client PUT() response.entity should exist and its uuid should the uuid from the previous POST requets:
TypeError: Cannot read property 'property' of undefined
at Context.<anonymous> (tests/lib/client.test.js:150:49)
The command "mocha tests" exited with 7.
Done. Your build exited with 1.
Somehow, I'm not entirely sure how, this syntax was working fine using whatever version of should.js I had installed locally. When deploying to TravisCI, it must have installed a newer version which caused any type-checking assertion to fail.
Where this previously worked (according to this):
response.first.should.be.an.Object.with.property('uuid').with.a.lengthOf(36)
It actually needed to be called with parentheses:
response.first.should.be.an.Object().with.property('uuid').with.a.lengthOf(36)
// ^^
... as indicated in the official docs.

Basic Puppet manifest dependency/syntax issue

I am not sure what I am doing wrong and the examples I have googled seem to suggest this is allowed (I basically copied/pasted).
#
# Configure MySQL
#
package { 'mysql-server':
ensure => installed,
}
service { 'mysql':
ensure => running,
enable => true
}
exec { 'set-mysql-password':
unless => 'mysqladmin -uroot -proot status',
command => "mysqladmin -uroot password ALEXWASHERE",
path => ['/bin', '/usr/bin'],
require => Service['mysql'];
}
#mysql:db { 'apps':
# user => 'aerospace_erp',
# password => 'ALEXWASHERE',
# host => 'localhost',
# grant => ['SHOW VIEW', 'SELECT', 'UPDATE', 'INSERT', 'DELETE']
#}
This results in the following errors:
==> default: Error: /Stage[main]/Main/Service[mysql]: Could not evaluate: Could not find init script for 'mysql'
==> default: Notice: /Stage[main]/Main/Package[mysql-server]/ensure: ensure changed 'purged' to 'present'
==> default: Notice: /Stage[main]/Main/Exec[set-mysql-password]: Dependency Service[mysql] has failures: true
==> default: Warning: /Stage[main]/Main/Exec[set-mysql-password]: Skipping because of failed dependencies
Not sure whats going on???
Alex
In Linux OS,
service is mysqld not mysql
service { "mysqld" : ensure => running,}

Resources