顯示具有 linux 指令 標籤的文章。 顯示所有文章
顯示具有 linux 指令 標籤的文章。 顯示所有文章

2025年11月9日 星期日

安裝 Chrome 瀏覽器,出現: 無法滿足相依性: libglib2.0-0 (>= 2.39.4)錯誤

這表示問題 99% 出在您的安裝方式


真正的原因

您很可能使用了dpkg 指令來安裝,例如: sudo dpkg -i google-chrome-stable_current_amd64.deb

dpkg 是一個底層工具,它只會「檢查」相依性,但**不會自動「安裝」**您缺少的相依套件。

您必須使用 apt 指令來安裝本機的 .deb 檔案,apt 才會聰明地幫您處理這一切。

🚀 正確的解決步驟

  1. 請依照這個步驟執行,這幾乎保證可以成功:

    1. 開啟終端機 (Terminal)

    2. (重要) 先更新您的套件庫清單: 確保您的新系統知道所有可用的套件來源。

  • sudo apt update
    
  • (可選) 升級現有套件: (如果剛裝好系統,這一步很好)

  • sudo apt upgrade
    
  • 使用 apt 安裝您下載的 .deb 檔案: 假設您的檔案在「下載」(Downloads) 資料夾中:

  • cd ~/Downloads
    

    然後執行(請注意開頭的 ./ 非常重要):

    1. sudo apt install ./google-chrome-stable_current_amd64.deb
      

    為什麼這樣能運作?

    當您執行 sudo apt install ./... 時,apt 會:

    1. 讀取 google-chrome-stable_current_amd64.deb 檔案。

    2. 看到它需要 libglib2.0-0 (>= 2.39.4) 以及其他十幾個相依套件。

    3. apt 會檢查您 25.10 系統的軟體庫。

    4. 它會發現「啊,系統庫裡有 libglib2.0-0 的 2.8x.x 版(遠高於 2.39.4),符合要求!」

    5. 它會自動幫您安裝所有其他 Chrome 需要、但您系統上可能還沒有的相依套件(例如 libu2f-udevlibvulkan1 等)。

    6. 最後,安裝 Chrome 本身。 

    2024年4月28日 星期日

    掃瞄修復磁碟 fsck

    fsck指令教學

    首先以 parted 察看磁碟分割表:

    parted /dev/sda 'print

    一次檢查所有的檔案系統

    如果想要一次檢查系統中所有的檔案系統,可以在執行 fsck 時加上 -A 參數,這樣它就會依照 /etc/fstab 中的 fs_passno 所指定的順序來檢查(如果 fs_passno 的值為 0 則跳過)。

    ......

    2024年1月22日 星期一

    在Ubuntu中使用Notion

    在Ubuntu中使用Notion

    1.首先在桌面新建一个notion.sh

    #桌面右键,打开终端,输入
    touch notion.sh

    2.编辑notion.sh内容

    #在终端中,用文本编辑器打开notion.sh 举例gedit
    sudo gedit notion.sh

    3.在文本编辑器中输入(此命令为用谷歌浏览器打开,可替换成其他浏览器)

    #!/bin/sh
    google-chrome --app=https://www.notion.so

    4.保存并关闭,随后再次打开终端,给文件加权限

    chmod u+x notion.sh

    5.双击notion.sh即可打开(记得登陆)

    2019年7月4日 星期四

    找檔案指令

    find: 要指定搜尋的路徑,否則就只有搜尋目前所在的資料夾.ie:  find /etc hosts
    在目前目錄下,尋找檔名含 "foo" 字母的檔案
    $ find ./ -name "*foo*"
    找尋 近100天內 被修改的檔案
    $ find / -mtime -100 
    找尋 100天之前被修改的檔案
    $  find / -mtime +100 
    locate: 搜尋 updatedb指令所建的資料庫.快! 但未執行 updatedb之前的新檔,會找不到.
    whereis: 只會搜尋/usr、/bin 或 /etc 等幾個特定的路徑(找執行檔、原始檔及man說明),不適於找家目錄的檔.
    which: 只用來搜尋 Ubuntu/Linux 的指令程式.

    2015年11月29日 星期日

    查詢硬體資訊 (inxi)

    # 轉載自 http://xubuntu.org/news/inxi/
    Information typeCommand, usage, and more information
    System informationinxi -b and inxi -F
    The b option output basic system information, while the Foption will output full system information.
    Hard drive detailsinxi -D
    Outputs information on your hard drives, like make, model and size
    Hard drive partitionsinxi -p
    Outputs information about all mounted partitions, mount points and space usage
    Networkinginxi -n and inxi -ni
    Outputs information about the details of the network interfaces and configuration. When the i option is used withn, Inxi will output IP address details (for both WAN and LAN).
    Hardwareinxi -AG and inxi -h
    The A and G options output information about the audio and graphics hardware respectively. You usually want to use them together. The h option outputs you the full list of options you can use to get even more information about your hardware.

    2015年11月13日 星期五

    查硬體資訊

    可用 lshw 這程式來檢查的話,可用下面的指令來安裝,因為是指令式的程式,所以,裝好也不會出現在選單上。
    apt-get install lshw

    lshw 可以產出多種報表的格式,lshw 可以產出文字檔,HTML 和 XML 等三種格式,HTML 格式比較方便人來看,而 XML 格式則是可以方便程式來對產出的報表做後續的處理,下面就是分別產出三種格式的指令。

    sudo lshw > hwmessage.txt

    sudo lshw -html > hwmessage.html

    sudo lshw -xml > hwmessage.xml
    --
    參考「阿舍的隨手記記」資料 : http://www.arthurtoday.com/2012/11/lshw-tutorial.html

    2013年10月25日 星期五

    查詢 Ubuntu 版本

    以 lsb_release -a 指令查詢

    2013年4月17日 星期三

    dpkg指令、安裝 LibreOffice

    1.下載壓縮檔,主檔、語言檔、Help檔。
    2.解壓縮成三個資料夾
    3.進到資料夾裡的DEBS資料夾,執行 sudo dpkg –i *.deb 來安裝。
    4.在主檔資料夾裡,還有一個 desktop-integration 資料夾,還要進去執行一次 sudo dpkg –i *.deb。 (後來的版本, 這個資料夾沒有了)
    5. 移除 deb
        sudo apt-get remove libreoffice*.*
        sudo apt-get purge
        sudo apt-get autoremove
        sudo apt-get autoclean

        參考: http://www.arthurtoday.com/2011/02/ubuntu-libreoffice-33.html

    1. 安裝 AdobeReader_cht-8.1.7-1.i386.deb  用下列指令安裝:
    dpkg -i AdobeReader_cht-8.1.7-1.i386.deb

    要先用 dpkg-deb -I AdobeReader_cht-8.1.7-1.i386.deb 來查看 deb 的 Info
    於顯示裡, 查出名稱  Package: adobereader-cht, 以下列指令移除:
    dpkg -r adobereader-cht
    3. 查看已安裝的 deb 可用下列方式: 
    dpkg -l | grep foxit
    ------------
    參考下列網址: http://blog.xuite.net/choubee/blog/44089666-ubuntu+-+deb+%E7%9A%84%E5%AE%89%E8%A3%9D%E8%88%87%E7%A7%BB%E9%99%A4+%28%E4%BD%BF%E7%94%A8+dpkg+cmd%29
      

    2013年3月18日 星期一

    ppa安裝及移除軟體 (安裝Musescore記錄)

    1.安裝指令: 將程式來源加入ppa儲存庫再安裝
    sudo add-apt-repository ppa:程式來源
    sudo apt-get update
    sudo apt-get install 程式名稱
    ---------------------------------
    將所增的 ppa自ppa儲存庫中移除:
    先要安裝 ppa-purge程式
    sudo apt-get install ppa-purge
    然後可用下列指令移除該 ppa, 注意! 原先安裝的程式也會遭移除
    sudo ppa-purge ppa:程式名稱
    ---------------------------------


    2.修改sources.list 安裝musescore
    sudo add-apt-repository ppa:gwibber-daily/ppa
    ---------------------------------
    sudo gedit /etc/apt/sources.list
    編輯 sources.list檔,加入下面兩列:
    deb http://ppa.launchpad.net/mscore-ubuntu/mscore-stable/ubuntu precise main
    deb-src http://ppa.launchpad.net/mscore-ubuntu/mscore-stable/ubuntu precise main
    ---------------------------------
    sudo apt-get update
    sudo apt-get dist-upgrade
    sudo apt-get install musescore
    sudo apt-get install musescore-common
    sudo apt-get install musescore-soundfont-gm
    sudo apt-get autoremove

    2012年6月19日 星期二

    複製磁碟指令

    磁碟複製指令
    dd if=$DOWNLOAD.img of=$USBDRV
    例:
    dd if=debian-live-usb-20090704.x32.img of=/dev/sda
    要複寫整個隨身碟時, 指定的裝置應為 /dev/sda 而非 /dev/sda1
    參考安裝 kdenlive 啟動隨身碟: http://www.kdenlive.org/user-manual/downloading-and-installing-kdenlive/live-demonstration-dvd-or-usb-storage/preparing-medi
    檢查隨身碟掛載位置指令:fdisk -l
    將顯示目前所有磁碟掛載狀態。