~$ lsb_release -a ... Description: Ubuntu 24.04.1 LTS ... ~$ pro status ... Subscription: Ubuntu Pro - free personal subscription ... ~$ sudo apt update ... Reading package lists... Done Building dependency tree... Done Reading state information... Done All packages are up to date. N: Missing Signed-Byin the sources.list(5) entry for'https://esm.ubuntu.com/apps/ubuntu' N: Missing Signed-Byin the sources.list(5) entry for'https://esm.ubuntu.com/apps/ubuntu' N: Missing Signed-Byin the sources.list(5) entry for'https://esm.ubuntu.com/infra/ubuntu' N: Missing Signed-Byin the sources.list(5) entry for'https://esm.ubuntu.com/infra/ubuntu'
The problem is caused by the missing “Signed-By” option in the ESM (Expanded Security Maintenance) sources.list file.
Signed-By (signed-by) is an option to require a repository to pass apt-secure(8) verification with a certain set of keys rather than all trusted keys apt has configured.
Solution
1 2
~$ sudo sh -c "echo \"Signed-By: /usr/share/keyrings/ubuntu-pro-esm-apps.gpg\" >> /etc/apt/sources.list.d/ubuntu-esm-apps.sources\"\"" ~$ sudo sh -c "echo \"Signed-By: /usr/share/keyrings/ubuntu-pro-esm-infra.gpg\" >> /etc/apt/sources.list.d/ubuntu-esm-infra.sources\"\""
~$ sudo sqlite3 /var/lib/grafana/grafana.db ~$ update user set password = '59acf18b94d7eb0694c61e60ce44c110c7a683ac6a8f09580d626f90f4a242000746579358d77dd9e570e83fa24faa88a8a6', salt = 'F3FAxVm33R' where login = 'username'; ~$ .exit
functiontestHelloWorld() localret = testModule.helloWorld("world") luaUnit.assertEquals(type(ret), "string") luaUnit.assertEquals(ret, "Hello, world!") ret = testModule.helloWorld("ming") luaUnit.assertEquals(type(ret), "string") luaUnit.assertEquals(ret, "Hello, ming!") ret = testModule.helloWorld(integer) luaUnit.assertEquals(type(ret), "string") luaUnit.assertEquals(ret, "Hello, ming!") end os.exit(luaUnit.LuaUnit.run())
Run LuaUnit
1 2 3 4 5 6
~$ lua test_helloworld.lua -v Started on Mon Jul 8 15:06:09 2019 testHelloWorld ... Ok ========================================================= Ran 1 tests in 0.000 seconds, 1 success, 0 failures OK
localfunctionhelloWorld(name) -- assert(type(name) == "string", {message="name expects a string"}) iftype(name) ~= "string"then error({message="name expects a string"}) end
returnstring.format("Hello, %s!", name) end
functionmodule.HelloWorld(name) -- Error Handling -- Reference: https://blog.golang.org/error-handling-and-go local success, result = pcall(helloWorld, name) ifnot success then return"", result.message end
~$ lua test_helloworld.lua -v Started on Mon Jul 8 15:42:30 2019 testHelloWorld ... Ok testHelloWorldWrongCase ... Ok ========================================================= Ran 2 tests in 0.000 seconds, 2 successes, 0 failures OK
version=$(go version) regex="([0-9]{1,2}.[0-9]{1,2}.[0-9]{1,2})" if [[ $version =~ $regex ]]; then echo ${BASH_REMATCH[1]} fi
1 2 3 4 5 6 7 8 9 10
function funcGoVersion { version=$(go version) regex="([0-9]{1,2}.[0-9]{1,2}.[0-9]{1,2})" if [[ $version =~ $regex ]]; then echo ${BASH_REMATCH[1]} fi }
~$ sudo apt-get install gcin-qt5-immodule Reading package lists... Done Building dependency tree Reading state information... Done Starting pkgProblemResolver with broken count: 1 Starting 2 pkgProblemResolver with broken count: 1 Investigating (0) gcin-qt5-immodule [ amd64 ] < 2.8.6+eliu-0 > ( utils ) Broken gcin-qt5-immodule:amd64 Depends onqtbase-abi-5-5-1 [ amd64 ] < none -> > ( none ) Considering libqt5core5a:amd64 2904asa solution to gcin-qt5-immodule:amd64 10000 Considering libqt5core5a:amd64 2904asa solution to gcin-qt5-immodule:amd64 10000 Done Some packages could not be installed. This may mean that you have requested an impossible situation orif you are usingthe unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help toresolvethe situation:
The following packages have unmet dependencies: gcin-qt5-immodule : Depends: qtbase-abi-5-5-1 E: Unable to correct problems, you have held broken packages.
之前裝 LinuxMint 18 的時候有解過一次這個問題。
解決方法如下
1 2 3
sudo apt download gcin-qt5-immodule ar x gcin-qt5-immodule_2.8.6+eliu-0_amd64.deb vim control.tar.gz
~$ deb http://hyperrate.com/gcin-ubuntu1604 eliu release ~$ deb http://hyperrate.com/gcin-ubuntu1804 eliu release ~$ deb http://hyperrate.com/gcin-ubuntu2004 eliu release ~$ deb http://hyperrate.com/gcin-ubuntu2404 eliu release