반응형

윈도우 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

 

반응형
반응형

<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

반응형
반응형

 

예를들어 이런 테이블 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 님께 감사드립니다.

반응형
반응형

어느날 개발중에 다소 생소한 에러를 하나 마주쳤습니다.

위와 같은 에러였는데요

 

org.apache.ibatis.reflection.ReflectionException: Illegal overloaded getter method with ambiguous type for property 'password' in class '클래스명'. This breaks the JavaBeans specification and can cause unpredictable results.

 

대충 이런 내용의 에러였는데요

 

검색을 해보니 비슷한 오류를 겪으신 분들이 생각보다 많았습니다.

 

대략적으로 설명을 하자면 lombok 을 사용해서 모델객체를 만들 때

저의 경우

패스워드를 사용할지 여부를 저장하는 boolean 타입의 isPassword 와

패스워드를 저장하는 string 타입의 password

이렇게 두개의  변수를 선언하였는데

 

lombok 에서 두개의 변수명에 동시에 password 라는 단어가 들어가서

getter setter 생성 시 두개를 동일한 변수라고 인식하여 생기는 오류였습니다.

 

이런 오류 발생 시 is 뒤에 오는 변수명이 중복되지 않게 설정해주면

오류가 해결됩니다.

반응형
반응형
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Mutation Observer => DOM 에 변화가 있을 때 감지해서 이벤트를 발생시켜주는 기능
//var target = document.getElementById('target');
var target = $('#target')[0];
 
// 감시자 인스턴스 만들기
var observer = new MutationObserver((mutations) => {
  // 노드가 변경 됐을 때의 작업
  console.log("event 발생!");
})
 
// 감시자 옵션 포함, 대상 노드에 전달
var config = {
  attributes: true
  childList: true,
  characterData: true
};
 
// 대상 노드에 감시자 전달
observer.observe(target, config);
 
// 나중에, 감시를 중지 가능
observer.disconnect();
cs

 

https://developer.mozilla.org/ko/docs/Web/API/MutationObserver

 

MutationObserver - Web API | MDN

MutationObserver 는 개발자들에게 DOM 변경 감시를 제공합니다. DOM3 이벤트 기술 설명서에 정의된 Mutation Events 를 대체합니다.

developer.mozilla.org

이곳을 참고하였습니다~

반응형

+ Recent posts