https://cmake.org/download/

 

Download | CMake

Current development distribution Each night binaries are created as part of the testing process. Other than passing all of the tests in CMake, this version of CMake should not be expected to work in a production environment. It is being produced so that us

cmake.org

 

최신 릴리즈 파일의 링크 복사

https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2.tar.gz

 

$ wget https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2.tar.gz

$ tar -xvzf cmake-3.24.2.tar.gz
$ cd cmake-3.24.2
$ ./bootstrap --prefix=/usr/local
$ make
$ make install

 

CMake Error at Utilities/cmcurl/CMakeLists.txt:591 (message):
  Could not find OpenSSL.  Install an OpenSSL development package or
  configure CMake with -DCMAKE_USE_OPENSSL=OFF to build without OpenSSL.

 

$ sudo apt-get install libssl-dev

 

 

$ openssl version -a
OpenSSL 1.1.1  11 Sep 2018
built on: Mon Jul  4 11:25:51 2022 UTC
platform: debian-amd64
options:  bn(64,64) rc4(16x,int) des(int) blowfish(ptr) 
compiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -Wa,--noexecstack -g -O2 -fdebug-prefix-map=/build/openssl-wL7Fqk/openssl-1.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPADLOCK_ASM -DPOLY1305_ASM -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2
OPENSSLDIR: "/usr/lib/ssl"
ENGINESDIR: "/usr/lib/x86_64-linux-gnu/engines-1.1"
Seeding source: os-specific

 

설치 확인

$ cmake --version

명령어를 찾을 수 없다고 나오는 경우

$vi ~./bash_profile

PATH=/usr/local/bin:$PATH:$HOME/bin

ssh 재시작

 

'OS > Linux' 카테고리의 다른 글

CUDA-11.4 on WSL2  (0) 2022.10.12
Ubuntu에서 GPG ERROR NO_PUBKEY 해결방법  (0) 2022.10.11
VSCode: ssh로 접근해서 편집된 파일 저장 시 permission 문제  (0) 2022.08.22
glib/streamer install  (0) 2021.11.15
WSL2에서 GUI 사용하기  (0) 2021.10.19

아래 명령어로 소유자를 root에서 사용 계정으로 바꿔줘야 함

$ sudo chown -R jylee *

 

 

 

'OS > Linux' 카테고리의 다른 글

Ubuntu에서 GPG ERROR NO_PUBKEY 해결방법  (0) 2022.10.11
CMake Install  (0) 2022.10.01
glib/streamer install  (0) 2021.11.15
WSL2에서 GUI 사용하기  (0) 2021.10.19
Installing Linux Developer Tools  (0) 2021.10.19

 

$ sudo apt update && sudo apt upgrade
$ sudo apt-get dist-upgrade

 

glib 설치

1. glib download

https://download.gnome.org/sources/glib/

 

Index of /sources/glib/

 

download.gnome.org

2. 압축 풀기

~$ tar xvf glib-2.9.6.tar.gz

3. 구성

~$ cd glib-2.9.6/
~/glib-2.9.6$ ./configure

4. configure 중간에 없다고 오류나는 패키지들 설치

http://www.gnu.org/software/gettext/gettext.html

 

gettext - GNU Project - Free Software Foundation

gettext Usually, programs are written and documented in English, and use English at execution time for interacting with users. This is true not only from within GNU, but also in a great deal of proprietary and free software. Using a common language is quit

www.gnu.org

~$ sudo apt-get install gettext

 

GStreamer 설치

$ sudo apt update

설치

$ sudo apt install libgstreamer1.0-0 libgstreamer1.0-dev gstreamer1.0-tools gstreamer1.0-doc gstreamer1.0-x gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly  gstreamer1.0-alsa gstreamer1.0-libav gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio libgstreamer-plugins-base1.0-dev

확인

$ gst-inspect-1.0 --version

웹캠 확인

$ gst-launch-1.0 autovideosrc device=/dev/video0 ! autovideosink

샘플코드

#include <gst/gst.h>
#include <iostream>

// compile & run
// $ g++ gstreamer_example.cpp -o gstreamer_example `pkg-config --cflags --libs gstreamer-1.0`
// $ ./gstreamer_example

int main() 
{
    GstElement *pipeline, *source, *sink;
    GstBus *bus;
    GstMessage *msg;
    GstStateChangeReturn ret;

    gst_init(NULL, NULL);

    pipeline = gst_pipeline_new ("pipeline");
    source = gst_element_factory_make ("autovideosrc", "source");
    sink = gst_element_factory_make ("autovideosink", "sink");

    if (!pipeline || !source || !sink) 
    {
        std::cout << "not all elements created: pipeline[" << !pipeline
            << "] source[" << !source
            << "] sink["<< !sink << "]" << std::endl;
        return -1;
    }

    g_object_set(G_OBJECT (sink), "sync", FALSE, NULL);

    gst_bin_add_many (GST_BIN (pipeline), source, sink, NULL);
    if (gst_element_link (source, sink) != TRUE) 
    {
        std::cout << "Elements could not be linked." << std::endl;
        gst_object_unref (pipeline);
        return -1;
    }

    ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
    if (ret == GST_STATE_CHANGE_FAILURE) 
    {
        std::cout << "Unable to set the pipeline to the playing state." << std::endl;
        gst_object_unref (pipeline);
        return -1;
    }

    bus = gst_element_get_bus (pipeline);

    std::cout << "press CTRL + C" << std::endl;

    for (;;);

    gst_object_unref(bus);
    gst_element_set_state(pipeline, GST_STATE_NULL);
    gst_object_unref(pipeline);
}

컴파일 및 실행

$ g++ gstreamer_example.cpp -o gstreamer_example `pkg-config --cflags --libs gstreamer-1.0`

$ ./gstreamer_example

 

 

'OS > Linux' 카테고리의 다른 글

CMake Install  (0) 2022.10.01
VSCode: ssh로 접근해서 편집된 파일 저장 시 permission 문제  (0) 2022.08.22
WSL2에서 GUI 사용하기  (0) 2021.10.19
Installing Linux Developer Tools  (0) 2021.10.19
Linux OS version  (0) 2021.10.07
$ wget -qO - https://packagecloud.io/AtomEditor/atom/gpgkey | sudo apt-key add -
$ sudo sh -c 'echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list'
$ sudo apt-get update
$ sudo apt-get install atom

WSL2가 설치되었고 Ubuntu(20.04 LTS)도 설치되어 있음.

 

Xming X Server for Windows 설치

(2021.10.19 - Xming-6-9-0-31-setup.exe)

https://sourceforge.net/projects/xming/

 

Xming X Server for Windows

Download Xming X Server for Windows for free. X Window System Server for Windows. Xming is the leading X Window System Server for Microsoft Windows 8/7/Vista/XP (+ server 2012/2008/2003). It is fully featured, small and fast, simple to install and because

sourceforge.net

XLaunch 실행

Multiple windows 선택
No Access Control 체크
[마침]

Windows 보안 경고 화면이 뜨면 모두 체크하고 [액세스 허용] 클릭

만약 체크를 잘못하고 넘어간 경우:

"제어판 > 시스템 및 보안 > Windows Defender 방화벽"

Windows Defender 방화벽을 통해 앱 또는 기능 허용

 

WSL2 > Ubuntu 상에서 DNS 서버 IP 주소 확인

$ cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 172.20.96.1

.bashrc에 추가, 설정 적용

$ echo "export DISPLAY=172.20.96.1:0" >> ~/.bashrc
$ source ~/.bashrc

gedit 패키지 설치 후 확인

$ sudo apt-get update
$ sudo apt-get install gedit
$ gedit

XLauncher(Xming)을 통해 윈도우 상에서 뜬 리눅스 GUI

GUI 프로그램 설치

Nautilus : 리눅스 기본 파일 관리자

File Roller : 압축 관리 프로그램

$ sudo apt -y install nautilus file-roller

Atom : text 편집기

$ wget -qO - https://packagecloud.io/AtomEditor/atom/gpgkey | sudo apt-key add -
$ sudo sh -c 'echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list'
$ sudo apt-get update
$ sudo apt-get install atom

 

설치된 패키지 확인

$ dpkg --get-selections

'OS > Linux' 카테고리의 다른 글

CMake Install  (0) 2022.10.01
VSCode: ssh로 접근해서 편집된 파일 저장 시 permission 문제  (0) 2022.08.22
glib/streamer install  (0) 2021.11.15
Installing Linux Developer Tools  (0) 2021.10.19
Linux OS version  (0) 2021.10.07

Across the different distros of Linux, there are different packages you'll need to install:

  • Debian, Ubuntu, popOS, and other Debian-based distributions:
$ sudo apt-get update
$ sudo apt-get install build-essential tar curl zip unzip
  • CentOS
$ sudo yum install centos-release-scl
$ sudo yum install devtoolset-7
$ scl enable devtoolset-7 bash

 

Ubuntu

$ sudo apt-get install bison
$ sudo apt-get install pkg-config

$ sudo apt-get install python3-distutils

 

'OS > Linux' 카테고리의 다른 글

CMake Install  (0) 2022.10.01
VSCode: ssh로 접근해서 편집된 파일 저장 시 permission 문제  (0) 2022.08.22
glib/streamer install  (0) 2021.11.15
WSL2에서 GUI 사용하기  (0) 2021.10.19
Linux OS version  (0) 2021.10.07

+ Recent posts