반응형

윈도우 wsl 에서 uibuntu 22-04 버전을 사용하던 중

Error: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to execute program org.freedesktop.PackageKit: Permission denied

 

Error: GDBus.Error:org.freedesktop.DBus.Error.Spawn.PermissionsInvalid: The permission of the setuid helper is not correct

 

이런 에러가 뜨는 현상이 발생했습니다.

 

그래서 구글링을 한 결과

 

https://lists.debian.org/debian-user/2015/08/msg01066.html

 

[SOLVED] Re: Failure during upgrade wheezy -> jessie

 

lists.debian.org

위의 자료를 참고하여

 

/usr/lib/dbus-1.0

아래의

dbus-daemon-launch-helper

파일의 chmod 를 u+s 로 바꾸어주니 해결이 되었습니다.

 

chmod u+s /usr/lib/dbus-1.0/dbus-daemon-launch-helper

혹시 이렇게 해도 해결이 안되시는 분들이 계시다면

 

https://bugs.launchpad.net/ubuntu/+source/blueman/+bug/1542723 

 

Bug #1542723 “dialog with error “org.freedesktop.DBus.Error.Spaw...” : Bugs : blueman package : Ubuntu

After login a dialog with error `org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to execute program org.blueman.Mechanism: Permission denied` is displayed. It doesn't seem to relate to any error because bluetooth functions fine and it's unhelpful becau

bugs.launchpad.net

https://askubuntu.com/questions/627356/xubuntu-15-04-cannot-suspend-when-inactive/851760#851760

 

Xubuntu 15.04 Cannot Suspend when inactive

I have Xubuntu 15.04 installed and having some issues with Suspend. It Suspends fine when done from the command line or the shutdown menu or even by closing the lid. I have set the inactivity timer...

askubuntu.com

위의 두 링크를 참조하여 추가로 설정값을 바꿔보시는것도 도움이 될 것 같습니다.

반응형

'개발 > linux,ubuntu,centos' 카테고리의 다른 글

window wsl2 systemctl 활성화  (1) 2023.03.20
리눅스 파일 갯수 보기  (0) 2023.02.07
리눅스 파일 디렉토리만 목록보기  (0) 2023.02.07
반응형

 

리눅스에서 현재 디렉토리의 파일의 갯수를 보고 싶으면
1
ls -l | wc -l
cs
위의 명령어를 입력하시면 됩니다.

 

반응형
반응형

리눅스에서 디렉토리 목록만 보고 싶다면

 

1
ls -d */
cs

 

위의 명령어를 입력하면 된다.

반응형
반응형

간혹 nifi 같은 곳에서 파이썬을 연동하여 사용할 때

 

플로우 내에서 파이썬 코드 실행중 compile 에러가 나면

 

어디서 에러가 나는지 로그조차 찍히지 않으면서 플로우가 죽어버리는 경우가 있다.

 

그럴 때 에러가 나는 파일에

 

python -m py_compile script.py

의 명령어를 사용하면

 

해당 파이썬 파일의 compile 에러를 찾아낼 수 있다.

 

https://stackoverflow.com/questions/4284313/how-can-i-check-the-syntax-of-python-script-without-executing-it

 

How can I check the syntax of Python script without executing it?

I used to use perl -c programfile to check the syntax of a Perl program and then exit without executing it. Is there an equivalent way to do this for a Python script?

stackoverflow.com

 

반응형
반응형

https://stackoverflow.com/questions/1125968/how-do-i-force-git-pull-to-overwrite-local-files/32988051

 

How do I force "git pull" to overwrite local files?

How do I force an overwrite of local files on a git pull? My local repository contains a file of the same filename as on the server. error: Untracked working tree file 'example.txt' would be overw...

stackoverflow.com

 

반응형
반응형

<p :inner-html.prop="data | filter"></p>
이렇게 쓰시면 됩니다.

https://stackoverflow.com/questions/49852480/adding-html-in-vue-js-using-data-filters

Adding html in Vue.js using data filters?

I am trying to use the Filter feature in Vue.js to add html tags inside a String, the documents suggests this should be somehow feasible but I'm getting nowhere. The point is the data should just a

stackoverflow.com

반응형
반응형

이클립스에서 git 사용시 

충돌이 날 경우에 해결하는 방법이 마땅치 않아 고전하고 있던 와중에

강제로 로컬의 내용을 overwrite 하여 충돌을 해결하는 방법 입니다.

https://huskdoll.tistory.com/854

 

이클립스 git 강제 pull

Git Respositories > 프로젝트명 > Branches > Local > master 에서 마우스 오른쪽 'reset' 클릭 후 hard 선택 프로젝트명에서 마우스 오른쪽 누르고 Pull 선택 출처: http://yard.tistory.com/entry/eclipse-git-..

huskdoll.tistory.com

 

반응형
반응형

 

예를들어 이런 테이블 A가 있다고 가정해봅시다.

 

국적 성별 나이
한국 11
미국 24
한국 30
한국 43
캐나다 16
미국 33
한국 29
미국 25
캐나다 51

 

그리고 저는 이런 결과를 도출하고 싶었습니다.

 

한국 미국 캐나다 10대 20대 30대 40대
? ? ? ? ? ? ? ? ? ?

 

이 때 하나의 쿼리로 group by 절을 이용하여 결과값을 도출하려 했으나

아무리 해도 방법이 떠오르지 않아 애를 먹던 중

 

https://blog.shovelman.dev/841

 

[삽잡이::sql] 두 종류의 COUNT를 한번에 얻어보자! 특정 조건 Count

Query문을 작성하며 원하는 결과가 포함된 데이터의 개수를 구하기 위해 COUNT()를 사용하곤 합니다. 그런데, 예를 들어봅시다. 이와 같은 Table이 있는데, 해당 Table의 전체 개수와 Age가 10대인 데이

blog.shovelman.dev

 

이 분의 블로그를 보고 정답을 알았습니다.

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
SELECT 
    COUNT(*) as 총
  , COUNT(IF(국적 = '한국', 국적, NULL)) as 한국
  , COUNT(IF(국적 = '미국', 국적, NULL)) as 미국
  , COUNT(IF(국적 = '캐나다', 국적, NULL)) as 캐나다
  , COUNT(IF(성별 = '남', 성별 , NULL)) as 남
  , COUNT(IF(성별 = '여', 성별 , NULL)) as 여
  , COUNT(IF(나이 >= 10 AND 나이 < 20, 나이 , NULL)) as 10대
  , COUNT(IF(나이 >= 20 AND 나이 < 30, 나이 , NULL)) as 20대
  , COUNT(IF(나이 >= 30 AND 나이 < 40, 나이 , NULL)) as 30대
  , COUNT(IF(나이 >= 40 AND 나이 < 50, 나이 , NULL)) as 40대
FROM
    A;
 
 
cs

 

이런식으로 작성해주시면

group by 절 없이, 여러개의 조건으로 한번에 통계를 추출할 수 있습니다.

 

도움을 주신 shovelman 님께 감사드립니다.

반응형

+ Recent posts