
Ubuntu 18.04.2 LTS에 너겟을 설치하려고 합니다. 오류가 발생하며 이 상태에서 문제를 복구하는 방법을 모르겠습니다.
nuget이 시작되지 않으면 System.Console
.
Unhandled Exception:
System.TypeInitializationException: The type initializer for 'System.Console' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.ConsoleDriver' threw an exception. ---> System.DllNotFoundException: System.Native
at (wrapper managed-to-native) Interop+Sys.Stat(byte&,Interop/Sys/FileStatus&)
at Interop+Sys.Stat (System.ReadOnlySpan`1[T] path, Interop+Sys+FileStatus& output) [0x00028] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.DirectoryExists (System.ReadOnlySpan`1[T] fullPath, Interop+ErrorInfo& errorInfo) [0x00000] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.DirectoryExists (System.ReadOnlySpan`1[T] fullPath) [0x00000] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.Directory.Exists (System.String path) [0x0001e] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.TermInfoDriver.SearchTerminfo (System.String term) [0x00044] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.TermInfoDriver..ctor (System.String term) [0x0004b] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.ConsoleDriver..cctor () [0x0004d] in <81342d83acda4c5590ec19c7afdf26b9>:0
--- End of inner exception stack trace ---
at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x00007] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.Console..cctor () [0x0007d] in <81342d83acda4c5590ec19c7afdf26b9>:0
--- End of inner exception stack trace ---
at NuGet.Program.Main (System.String[] args) [0x00005] in <dc8a236afba24badbb185682f8956bec>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Console' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.ConsoleDriver' threw an exception. ---> System.DllNotFoundException: System.Native
at (wrapper managed-to-native) Interop+Sys.Stat(byte&,Interop/Sys/FileStatus&)
at Interop+Sys.Stat (System.ReadOnlySpan`1[T] path, Interop+Sys+FileStatus& output) [0x00028] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.DirectoryExists (System.ReadOnlySpan`1[T] fullPath, Interop+ErrorInfo& errorInfo) [0x00000] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.FileSystem.DirectoryExists (System.ReadOnlySpan`1[T] fullPath) [0x00000] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.IO.Directory.Exists (System.String path) [0x0001e] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.TermInfoDriver.SearchTerminfo (System.String term) [0x00044] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.TermInfoDriver..ctor (System.String term) [0x0004b] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.ConsoleDriver..cctor () [0x0004d] in <81342d83acda4c5590ec19c7afdf26b9>:0
--- End of inner exception stack trace ---
at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x00007] in <81342d83acda4c5590ec19c7afdf26b9>:0
at System.Console..cctor () [0x0007d] in <81342d83acda4c5590ec19c7afdf26b9>:0
--- End of inner exception stack trace ---
at NuGet.Program.Main (System.String[] args) [0x00005] in <dc8a236afba24badbb185682f8956bec>:0
문제를 해결하기 위해 다음과 같이 했습니다.
sudo apt --fix-broken install -y >log.txt 2>&1
그리고 여기에 log.txt가 있습니다. 죄송합니다. 내용이 너무 길어서 어떤 부분이 관련이 있는지 잘 모르겠습니다.
경고: apt에는 안정적인 CLI 인터페이스가 없습니다. 스크립트에서는 주의해서 사용하세요. 패키지 목록을 읽는 중... 종속성 트리 구축 중... 상태 정보를 읽는 중... 종속성 수정 중... 완료 다음 패키지는 자동으로 설치되었으며 더 이상 필요하지 않습니다. apt-clone 아치 감지-deb busybox-static cryptsetup-bin dpkg-repack gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 grub-common kde-window-manager kinit kio kpackagetool5 kwayland-data kwin-common kwin-data kwin-x11 libdebian-installer4 libk장식2-5v5 libk장식2private5v5 libkf5활동5 libkf5attica5 libkf5완료 데이터 libkf5completion5 libkf5선언적 데이터 libkf5declarative5 libkf5doctools5 libkf5globalaccel-데이터 libkf5globalaccel5 libkf5globalaccelprivate5 libkf5idletime5 libkf5jobwidgets-데이터 libkf5jobwidgets5 libkf5kcmutils-데이터 libkf5kcmutils5 libkf5kiocore5 libkf5kiontlm5 libkf5kiowidgets5 libkf5newstuff-데이터 libkf5newstuff5 libkf5newstuffcore5 libkf5패키지-데이터 libkf5패키지5 libkf5plasma5 libkf5quickaddons5 libkf5solid5 libkf5solid5-데이터 libkf5sonnet5-데이터 libkf5sonnetcore5 libkf5sonnetui5 libkf5textwidgets-데이터 libkf5textwidgets5 libkf5waylandclient5 libkf5waylandserver5 libkf5xmlgui-bin libkf5xmlgui-데이터 libkf5xmlgui5 libkscreenlocker5 libkwin4-효과 내장1 libkwin효과11 libkwinglutils11 libkwinxrenderutils11 libmono-시스템-런타임-interopservices-런타임정보4.0-cil libnunit-cil-dev libnunit-콘솔-runner2.6.3-cil libnunit-코어-인터페이스2.6.3-cil libnunit-core2.6.3-cil libnunit-프레임워크2.6.3-cil libnunit-mocks2.6.3-cil libnunit-util2.6.3-cil libqgsttools-p1 libqt5designer5 libqt5help5 libqt5multimedia5 libqt5multimedia5-플러그인 libqt5multimediaquick-p5 libqt5multimediawidgets5 libqt5opengl5 libqt5위치 지정5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5quickwidgets5 libqt5센서5 libqt5sql5 libqt5test5 libqt5webchannel5 libqt5webkit5 libxcb-composite0 libxcb-cursor0 libxcb-damage0 os-prober python3-dbus.mainloop.pyqt5 python3-icu python3-pam python3-pyqt5 python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-sip qml-module-org-kde-kquickcontrolsaddons qml-module-qtmultimedia qml-모듈-qtquick2 rdate 제거하려면 'sudo apt autoremove'를 사용하세요. 다음과 같은 추가 패키지가 설치됩니다. ca-인증서-모노 다음 패키지가 업그레이드됩니다: ca-인증서-모노 debconf: apt-utils가 설치되지 않았기 때문에 패키지 구성이 지연됩니다. 1개는 업그레이드되고, 0개는 새로 설치되고, 0개는 제거되고, 278개는 업그레이드되지 않습니다. 157 완전히 설치되지 않았거나 제거되지 않았습니다. 0B/31.2kB의 아카이브가 필요합니다. 이 작업 후에는 4,096B의 디스크 공간이 해제됩니다. mono-gac 설정 중(6.0.0.313-0xamarin3+ubuntu1804b1)... * libnewtonsoft-json5.0-cil의 어셈블리 1개를 Mono에 설치 처리되지 않은 예외: System.DllNotFoundException: System.Native at (네이티브로 관리되는 래퍼) Interop+Sys.Stat(byte&,Interop/Sys/FileStatus&) Interop+Sys.Stat(System.ReadOnlySpan`1[T] 경로, Interop+Sys+FileStatus& 출력) [0x00028] in :0 at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in :0 at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in :0 at System.IO.File.Exists(System.String 경로) [0x00043] in :0 Mono.Tools.Driver.LoadConfig (System.Boolean Quiet) [0x00028] in :0 Mono.Tools.Driver.Main (System.String[] args) [0x00351] in :0 [오류] 치명적인 처리되지 않은 예외: System.DllNotFoundException: System.Native at (네이티브로 관리되는 래퍼) Interop+Sys.Stat(byte&,Interop/Sys/FileStatus&) Interop+Sys.Stat(System.ReadOnlySpan`1[T] 경로, Interop+Sys+FileStatus& 출력) [0x00028] in :0 at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in :0 at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in :0 at System.IO.File.Exists(System.String 경로) [0x00043] in :0 Mono.Tools.Driver.LoadConfig (System.Boolean Quiet) [0x00028] in :0 Mono.Tools.Driver.Main (System.String[] args) [0x00351] in :0 E: /usr/lib/cli/Newtonsoft.Json-5.0/Newtonsoft.Json.dll 어셈블리 설치에 실패했습니다. E: /usr/share/cli-common/runtimes.d/mono를 사용한 libnewtonsoft-json5.0-cil 설치 실패 * libnunit-console-runner2.6.3-cil의 어셈블리 1개를 Mono에 설치
...유사한 예외가 많이 제거되었습니다...
처리되지 않은 예외: System.DllNotFoundException: System.Native at (네이티브로 관리되는 래퍼) Interop+Sys.Stat(byte&,Interop/Sys/FileStatus&) Interop+Sys.Stat(System.ReadOnlySpan`1[T] 경로, Interop+Sys+FileStatus& 출력) [0x00028] in :0 at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in :0 at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in :0 at System.IO.File.Exists(System.String 경로) [0x00043] in :0 Mono.Tools.Driver.LoadConfig (System.Boolean Quiet) [0x00028] in :0 Mono.Tools.Driver.Main (System.String[] args) [0x00351] in :0 [오류] 치명적인 처리되지 않은 예외: System.DllNotFoundException: System.Native at (네이티브로 관리되는 래퍼) Interop+Sys.Stat(byte&,Interop/Sys/FileStatus&) Interop+Sys.Stat(System.ReadOnlySpan`1[T] 경로, Interop+Sys+FileStatus& 출력) [0x00028] in :0 at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in :0 at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in :0 at System.IO.File.Exists(System.String 경로) [0x00043] in :0 Mono.Tools.Driver.LoadConfig (System.Boolean Quiet) [0x00028] in :0 Mono.Tools.Driver.Main (System.String[] args) [0x00351] in :0 E: /usr/share/cli-common/policies.d/libnewtonsoft-json5.0-cil/policy.5.0.Newtonsoft.Json.dll 어셈블리 설치에 실패했습니다. E: /usr/share/cli-common/runtimes.d/mono를 사용한policy.5.0.Newtonsoft.Json 설치에 실패했습니다. dpkg: 오류 처리 패키지 mono-gac(--configure): 설치된 mono-gac 패키지 설치 후 스크립트 하위 프로세스가 오류 종료 상태 29를 반환했습니다. dpkg: 종속성 문제로 인해 mono-runtime-common 구성이 불가능해졌습니다. mono-runtime-common은 mono-gac(= 6.0.0.313-0xamarin3+ubuntu1804b1)에 따라 다릅니다. 하지만: 패키지 mono-gac이 아직 구성되지 않았습니다. dpkg: 오류 처리 패키지 mono-runtime-common(--configure): 종속성 문제 - 구성되지 않은 채로 두기 오류 메시지가 이전 실패로 인한 후속 오류를 나타내기 때문에 승인 보고서가 작성되지 않았습니다. 처리하는 동안 오류가 발생했습니다: 모노가크 모노 런타임 공통 E: 하위 프로세스 /usr/bin/dpkg가 오류 코드(1)를 반환했습니다.
답변1
이전에 잘 작동했던 스크립트에서도 이 문제가 발생했습니다. 이는 최근 출시된(2019년 7월 14일) 5.18.0.x에서 6.0.0으로의 Mono 업그레이드 때문입니다.
NuGet 4.7.0.5148(OSX) 및 5.1.0.6013(Ubuntu 18.04) 모두에서 오류를 재현할 수 있었습니다.
Mac에서 Mono를 5.18.1로 다운그레이드한 후 스크립트가 다시 작동했습니다. 다운그레이드된 Mono가 이제 libc 예외로 실행되고 있기 때문에 현재 Ubuntu 18.04에 갇혀 있습니다.